You are here

public static function PHPUnit_Util_Filesystem::classNameToFilename in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/phpunit/src/Util/Filesystem.php \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 vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php
PHPUnit_TextUI_Command::handleLoader in vendor/phpunit/phpunit/src/TextUI/Command.php
Handles the loading of the PHPUnit_Runner_TestSuiteLoader implementation.
PHPUnit_TextUI_Command::handlePrinter in vendor/phpunit/phpunit/src/TextUI/Command.php
Handles the loading of the PHPUnit_Util_Printer implementation.

File

vendor/phpunit/phpunit/src/Util/Filesystem.php, line 32

Class

PHPUnit_Util_Filesystem
Filesystem helpers.

Code

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