public static function PHPUnit_Util_Configuration::getInstance in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Util/Configuration.php \PHPUnit_Util_Configuration::getInstance()
Returns a PHPUnit configuration object.
@since Method available since Release 3.4.0
Parameters
string $filename:
Return value
10 calls to PHPUnit_Util_Configuration::getInstance()
- PHPUnit_TextUI_Command::handleArguments in vendor/
phpunit/ phpunit/ src/ TextUI/ Command.php - Handles the command-line arguments.
- PHPUnit_TextUI_TestRunner::handleConfiguration in vendor/
phpunit/ phpunit/ src/ TextUI/ TestRunner.php - @since Method available since Release 3.2.1
- Util_ConfigurationTest::setUp in vendor/
phpunit/ phpunit/ tests/ Util/ ConfigurationTest.php - Sets up the fixture, for example, open a network connection. This method is called before a test is executed.
- Util_ConfigurationTest::testExceptionIsThrownForNotExistingConfigurationFile in vendor/
phpunit/ phpunit/ tests/ Util/ ConfigurationTest.php - @covers PHPUnit_Util_Configuration::getInstance @expectedException PHPUnit_Framework_Exception
- Util_ConfigurationTest::testShouldReadColorsWhenEmptyInConfigurationfile in vendor/
phpunit/ phpunit/ tests/ Util/ ConfigurationTest.php - @covers PHPUnit_Util_Configuration::getPHPUnitConfiguration
File
- vendor/
phpunit/ phpunit/ src/ Util/ Configuration.php, line 176
Class
- PHPUnit_Util_Configuration
- Wrapper for the PHPUnit XML configuration file.
Code
public static function getInstance($filename) {
$realpath = realpath($filename);
if ($realpath === false) {
throw new PHPUnit_Framework_Exception(sprintf('Could not read "%s".', $filename));
}
if (!isset(self::$instances[$realpath])) {
self::$instances[$realpath] = new self($realpath);
}
return self::$instances[$realpath];
}