UnexpectedCallsCountExceptionSpec.php 815 B

12345678910111213141516171819202122232425262728
  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 UnexpectedCallsCountExceptionSpec extends ObjectBehavior
  8. {
  9. function let( ObjectProphecy $objectProphecy, MethodProphecy $methodProphecy, Call $call1, Call $call2) {
  10. $methodProphecy->getObjectProphecy()->willReturn($objectProphecy);
  11. $this->beConstructedWith('message', $methodProphecy, 5, array($call1, $call2));
  12. }
  13. function it_extends_UnexpectedCallsException()
  14. {
  15. $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\UnexpectedCallsException');
  16. }
  17. function it_should_expose_expectedCount_through_getter()
  18. {
  19. $this->getExpectedCount()->shouldReturn(5);
  20. }
  21. }