public static function PHPUnit_Util_Filesystem::classNameToFilename

Maps class names to source file names:

  • PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php
  • Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php

@since Method available since Release 3.4.0

Parameters

string $className:

Return value

string

3 calls to PHPUnit_Util_Filesystem::classNameToFilename()
PHPUnit_Runner_StandardTestSuiteLoader::load in drupal/core/vendor/phpunit/phpunit/PHPUnit/Runner/StandardTestSuiteLoader.php
PHPUnit_TextUI_Command::handleLoader in drupal/core/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php
Handles the loading of the PHPUnit_Runner_TestSuiteLoader implementation.
PHPUnit_TextUI_Command::handlePrinter in drupal/core/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php
Handles the loading of the PHPUnit_Util_Printer implementation.

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Filesystem.php, line 73

Class

PHPUnit_Util_Filesystem
Filesystem helpers.

Code

public static function classNameToFilename($className) {
  return str_replace(array(
    '_',
    '\\',
  ), DIRECTORY_SEPARATOR, $className) . '.php';
}