Move into nested docroot
This commit is contained in:
parent
83a0d3a149
commit
c8b70abde9
13405 changed files with 0 additions and 0 deletions
58
web/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php
vendored
Normal file
58
web/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
namespace spec\Prophecy\Promise;
|
||||
|
||||
use PhpSpec\ObjectBehavior;
|
||||
|
||||
class ThrowPromiseSpec extends ObjectBehavior
|
||||
{
|
||||
function let()
|
||||
{
|
||||
$this->beConstructedWith('RuntimeException');
|
||||
}
|
||||
|
||||
function it_is_promise()
|
||||
{
|
||||
$this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Prophecy\Prophecy\ObjectProphecy $object
|
||||
* @param \Prophecy\Prophecy\MethodProphecy $method
|
||||
*/
|
||||
function it_instantiates_and_throws_exception_from_provided_classname($object, $method)
|
||||
{
|
||||
$this->beConstructedWith('InvalidArgumentException');
|
||||
|
||||
$this->shouldThrow('InvalidArgumentException')
|
||||
->duringExecute(array(), $object, $method);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Prophecy\Prophecy\ObjectProphecy $object
|
||||
* @param \Prophecy\Prophecy\MethodProphecy $method
|
||||
*/
|
||||
function it_instantiates_exceptions_with_required_arguments($object, $method)
|
||||
{
|
||||
$this->beConstructedWith('spec\Prophecy\Promise\RequiredArgumentException');
|
||||
|
||||
$this->shouldThrow('spec\Prophecy\Promise\RequiredArgumentException')
|
||||
->duringExecute(array(), $object, $method);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Prophecy\Prophecy\ObjectProphecy $object
|
||||
* @param \Prophecy\Prophecy\MethodProphecy $method
|
||||
*/
|
||||
function it_throws_provided_exception($object, $method)
|
||||
{
|
||||
$this->beConstructedWith($exc = new \RuntimeException('Some exception'));
|
||||
|
||||
$this->shouldThrow($exc)->duringExecute(array(), $object, $method);
|
||||
}
|
||||
}
|
||||
|
||||
class RequiredArgumentException extends \Exception
|
||||
{
|
||||
final public function __construct($message, $code) {}
|
||||
}
|
Reference in a new issue