ÿØÿà JFIF ÿþ; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 157.90.209.209 / Your IP : 216.73.216.148 [ Web Server : Apache System : Linux hcomm124.dns-wk.info 4.18.0-553.64.1.el8_10.x86_64 #1 SMP Mon Jul 28 12:01:56 EDT 2025 x86_64 User : evidenciarevista ( 1049) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Domains : 216 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/evidenciarevista/admin/vendor/phpspec/phpspec/spec/PhpSpec/Util/ |
Upload File : |
<?php namespace spec\PhpSpec\Util; use PhpSpec\ObjectBehavior; use Prophecy\Argument; class ClassFileAnalyserSpec extends ObjectBehavior { function it_should_return_the_line_number_of_the_start_of_the_first_method() { $class = $this->getSingleMethodClass(); $this->getStartLineOfFirstMethod($class)->shouldReturn(7); } function it_should_detect_if_class_has_a_method() { $class = $this->getSingleMethodClass(); $this->classHasMethods($class)->shouldReturn(true); } function it_should_detect_if_class_has_no_methods() { $class = $this->getClassWithNoMethods(); $this->classHasMethods($class)->shouldReturn(false); } function it_should_return_the_line_number_of_the_end_of_the_named_method() { $class = $this->getSingleMethodClass(); $this->getEndLineOfNamedMethod($class, 'methodOne')->shouldReturn(13); } function it_should_return_the_line_number_of_the_end_of_the_last_method() { $class = $this->getSingleMethodClassContainingAnonymousFunction(); $this->getEndLineOfLastMethod($class)->shouldReturn(12); } private function getSingleMethodClass() { return <<<SINGLE_METHOD_CLASS <?php namespace MyNamespace; final class MyClass { /** * @return string */ public function methodOne() { return 'something'; } } SINGLE_METHOD_CLASS; } private function getClassWithNoMethods() { return <<<NO_METHOD_CLASS <?php namespace MyNamespace; final class MyClass { } NO_METHOD_CLASS; } private function getSingleMethodClassContainingAnonymousFunction() { return <<<SINGLE_METHOD_CLASS_CONTAINING_ANONYMOUS_FUNCTION <?php namespace MyNamespace; class MyClass { public function testAnAnonymousFunction() { return function () { return 'something'; }; } // com } /* comment } */ SINGLE_METHOD_CLASS_CONTAINING_ANONYMOUS_FUNCTION; } }