No Description

UnexpectedCallsExceptionSpec.php 1.0KB

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