1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
<?php
namespace spec\Prophecy\Exception\Prediction;
use PhpSpec\ObjectBehavior;
use Prophecy\Call\Call;
use Prophecy\Prophecy\MethodProphecy;
use Prophecy\Prophecy\ObjectProphecy;
class UnexpectedCallsExceptionSpec extends ObjectBehavior
{
function let(ObjectProphecy $objectProphecy, MethodProphecy $methodProphecy, Call $call1, Call $call2)
{
$methodProphecy->getObjectProphecy()->willReturn($objectProphecy);
$this->beConstructedWith('message', $methodProphecy, array($call1, $call2));
}
function it_is_PredictionException()
{
$this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException');
}
function it_extends_MethodProphecyException()
{
$this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException');
}
function it_should_expose_calls_list_through_getter($call1, $call2)
{
$this->getCalls()->shouldReturn(array($call1, $call2));
}
}
|