public static function 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 drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php
Util_TestTest::testParseAnnotation in drupal/core/vendor/phpunit/phpunit/Tests/Util/TestTest.php
Util_TestTest::testParseAnnotationThatIsOnlyOneLine in drupal/core/vendor/phpunit/phpunit/Tests/Util/TestTest.php

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Test.php, line 365

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);
}