gluon-web-remote

Web remote Administration for big size of gluon routers
git clone git://archive.git.mtrnord.blog/MTRNord/gluon-web-remote.git
Log | Files | Refs | README

CallSpec.php (1313B)


      1 <?php
      2 
      3 namespace spec\Prophecy\Call;
      4 
      5 use PhpSpec\ObjectBehavior;
      6 
      7 class CallSpec extends ObjectBehavior
      8 {
      9     /**
     10      * @param \Exception $exception
     11      */
     12     function let($exception)
     13     {
     14         $this->beConstructedWith('setValues', array(5, 2), 42, $exception, 'some_file.php', 23);
     15     }
     16 
     17     function it_exposes_method_name_through_getter()
     18     {
     19         $this->getMethodName()->shouldReturn('setValues');
     20     }
     21 
     22     function it_exposes_arguments_through_getter()
     23     {
     24         $this->getArguments()->shouldReturn(array(5, 2));
     25     }
     26 
     27     function it_exposes_return_value_through_getter()
     28     {
     29         $this->getReturnValue()->shouldReturn(42);
     30     }
     31 
     32     function it_exposes_exception_through_getter($exception)
     33     {
     34         $this->getException()->shouldReturn($exception);
     35     }
     36 
     37     function it_exposes_file_and_line_through_getter()
     38     {
     39         $this->getFile()->shouldReturn('some_file.php');
     40         $this->getLine()->shouldReturn(23);
     41     }
     42 
     43     function it_returns_shortpath_to_callPlace()
     44     {
     45         $this->getCallPlace()->shouldReturn('some_file.php:23');
     46     }
     47 
     48     function it_returns_unknown_as_callPlace_if_no_file_or_line_provided()
     49     {
     50         $this->beConstructedWith('setValues', array(), 0, null, null, null);
     51 
     52         $this->getCallPlace()->shouldReturn('unknown');
     53     }
     54 }