UnexpectedCallsExceptionSpec.php 961 B

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