Esempio n. 1
0
 private function getMethods(Spec $spec)
 {
     $reflection = $spec->getReflection();
     $result = [];
     $methods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC ^ \ReflectionMethod::IS_ABSTRACT);
     foreach ($methods as $method) {
         if (0 !== strpos($method->getName(), 'it_')) {
             continue;
         }
         $result[] = new InvokableMethod($method);
     }
     return $result;
 }
Esempio n. 2
0
 function let(Suite $suite, Spec $spec, \ReflectionClass $refl)
 {
     $spec->getReflection()->willReturn($refl);
     $this->beConstructedWith($suite, $spec);
 }