public static function PHPUnit_Util_Configuration::getInstance

Returns a PHPUnit configuration object.

@since Method available since Release 3.4.0

Parameters

string $filename:

Return value

PHPUnit_Util_Configuration

6 calls to PHPUnit_Util_Configuration::getInstance()
PHPUnit_TextUI_Command::handleArguments in drupal/core/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php
Handles the command-line arguments.
PHPUnit_TextUI_TestRunner::handleConfiguration in drupal/core/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php
@since Method available since Release 3.2.1
simpletest_phpunit_get_available_tests in drupal/core/modules/simpletest/simpletest.module
Get PHPUnit Classes
Util_ConfigurationTest::setUp in drupal/core/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 drupal/core/vendor/phpunit/phpunit/Tests/Util/ConfigurationTest.php
@expectedException PHPUnit_Framework_Exception

... See full list

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php, line 210

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 PHPUnit_Util_Configuration($realpath);
  }
  return self::$instances[$realpath];
}