/** * Takes a test and adds its dependencies * * @param PHPUnit_Framework_Test $test Object. A Test can be run and collect its results * @param string $className Name of class what loaded to parsing and execute * @param string $methodName Name of method what loaded from class to adding dependencies * * @return void */ public static function addTestDependencies(PHPUnit_Framework_Test $test, $className, $methodName) { if ($test instanceof PHPUnit_Framework_TestCase || $test instanceof PHPUnit_Framework_TestSuite_DataProvider) { $test->setDependencies(PHPUnit_Util_Test::getDependencies($className, $methodName)); } return $test; }