Esempio n. 1
0
 /**
  * @return Test[]
  */
 public function getTests()
 {
     $class = new \ReflectionClass($this->suite);
     $methods = $class->getMethods();
     $filtered = array_filter($methods, function (\ReflectionMethod $method) {
         return $this->filter->acceptsMethod($method) && $method->getDeclaringClass()->getName() == $this->suite && substr($method->getName(), 0, 1) != '_' && $method->getName() != PlainTestCase::BEFORE_METHOD && $method->getName() != PlainTestCase::AFTER_METHOD && !$method->isConstructor() && !$method->isStatic() && $method->isPublic();
     });
     foreach ($filtered as $method) {
         (yield $this->createTestCase($class, $method));
     }
 }
Esempio n. 2
0
 private function thenTheFilterShouldNotAcceptTheMethod($class, $methodName)
 {
     $this->assert->not()->isTrue($this->filter->acceptsMethod(new \ReflectionMethod($class, $methodName)));
 }