public static function PHPUnit_Util_Test::getDependencies in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Util/Test.php \PHPUnit_Util_Test::getDependencies()
Returns the dependencies for a test class or method.
@since Method available since Release 3.4.0
Parameters
string $className:
string $methodName:
Return value
array
3 calls to PHPUnit_Util_Test::getDependencies()
- PHPUnit_Framework_TestSuite::addTestMethod in vendor/
phpunit/ phpunit/ src/ Framework/ TestSuite.php - Util_TestTest::testParseAnnotation in vendor/
phpunit/ phpunit/ tests/ Util/ TestTest.php - @covers PHPUnit_Util_Test::getDependencies @todo Not sure what this test tests (name is misleading at least)
- Util_TestTest::testParseAnnotationThatIsOnlyOneLine in vendor/
phpunit/ phpunit/ tests/ Util/ TestTest.php - @covers PHPUnit_Util_Test::getDependencies
File
- vendor/
phpunit/ phpunit/ src/ Util/ Test.php, line 558
Class
- PHPUnit_Util_Test
- Test helpers.
Code
public static function getDependencies($className, $methodName) {
$annotations = self::parseTestMethodAnnotations($className, $methodName);
$dependencies = array();
if (isset($annotations['class']['depends'])) {
$dependencies = $annotations['class']['depends'];
}
if (isset($annotations['method']['depends'])) {
$dependencies = array_merge($dependencies, $annotations['method']['depends']);
}
return array_unique($dependencies);
}