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; }
function let(Suite $suite, Spec $spec, \ReflectionClass $refl) { $spec->getReflection()->willReturn($refl); $this->beConstructedWith($suite, $spec); }