UnexpectedCallExceptionSpec.php 776 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace spec\Prophecy\Exception\Call;
  3. use PhpSpec\ObjectBehavior;
  4. use Prophecy\Prophecy\ObjectProphecy;
  5. use spec\Prophecy\Exception\Prophecy\Prophecy;
  6. class UnexpectedCallExceptionSpec extends ObjectBehavior
  7. {
  8. function let(ObjectProphecy $objectProphecy)
  9. {
  10. $this->beConstructedWith('msg', $objectProphecy, 'getName', array('arg1', 'arg2'));
  11. }
  12. function it_is_prophecy_exception()
  13. {
  14. $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ObjectProphecyException');
  15. }
  16. function it_exposes_method_name_through_getter()
  17. {
  18. $this->getMethodName()->shouldReturn('getName');
  19. }
  20. function it_exposes_arguments_through_getter()
  21. {
  22. $this->getArguments()->shouldReturn(array('arg1', 'arg2'));
  23. }
  24. }