MethodNotFoundExceptionSpec.php 898 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace spec\Prophecy\Exception\Doubler;
  3. use PhpSpec\ObjectBehavior;
  4. use spec\Prophecy\Exception\Prophecy;
  5. class MethodNotFoundExceptionSpec extends ObjectBehavior
  6. {
  7. function let()
  8. {
  9. $this->beConstructedWith('', 'User', 'getName', array(1, 2, 3));
  10. }
  11. function it_is_DoubleException()
  12. {
  13. $this->shouldHaveType('Prophecy\Exception\Doubler\DoubleException');
  14. }
  15. function it_has_MethodName()
  16. {
  17. $this->getMethodName()->shouldReturn('getName');
  18. }
  19. function it_has_classnamej()
  20. {
  21. $this->getClassname()->shouldReturn('User');
  22. }
  23. function it_has_an_arguments_list()
  24. {
  25. $this->getArguments()->shouldReturn(array(1, 2, 3));
  26. }
  27. function it_has_a_default_null_argument_list()
  28. {
  29. $this->beConstructedWith('', 'User', 'getName');
  30. $this->getArguments()->shouldReturn(null);
  31. }
  32. }