示例#1
0
 protected function createTestFromCestMethod($cestInstance, $methodName, $file)
 {
     if (strpos($methodName, '_') === 0 or $methodName == '__construct') {
         return null;
     }
     $testClass = get_class($cestInstance);
     $cest = new Cest();
     $cest->configName($methodName)->configFile($file)->config('testClassInstance', $cestInstance)->config('testMethod', $methodName)->initConfig();
     $cest->getScenario()->env(Annotation::forMethod($testClass, $methodName)->fetchAll('env'));
     $cest->setDependencies(\PHPUnit_Util_Test::getDependencies($testClass, $methodName));
     return $cest;
 }
示例#2
0
 protected function createTestFromCestMethod($cestInstance, $methodName, $file)
 {
     if (strpos($methodName, '_') === 0 || $methodName == '__construct') {
         return null;
     }
     $testClass = get_class($cestInstance);
     $cest = new Cest();
     $cest->configName($methodName)->configFile($file)->config('testClassInstance', $cestInstance)->config('testMethod', $methodName);
     $cest->setDependencies(\PHPUnit_Util_Test::getDependencies($testClass, $methodName));
     return $cest;
 }