public function Util_ConfigurationTest::testListenerConfigurationIsReadCorrectly in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php \Util_ConfigurationTest::testListenerConfigurationIsReadCorrectly()
@covers PHPUnit_Util_Configuration::getListenerConfiguration
File
- vendor/
phpunit/ phpunit/ tests/ Util/ ConfigurationTest.php, line 193
Class
- Util_ConfigurationTest
- @since Class available since Release 3.3.0
Code
public function testListenerConfigurationIsReadCorrectly() {
$dir = __DIR__;
$includePath = ini_get('include_path');
ini_set('include_path', $dir . PATH_SEPARATOR . $includePath);
$this
->assertEquals(array(
0 => array(
'class' => 'MyListener',
'file' => '/optional/path/to/MyListener.php',
'arguments' => array(
0 => array(
0 => 'Sebastian',
),
1 => 22,
2 => 'April',
3 => 19.78,
4 => null,
5 => new stdClass(),
6 => dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'MyTestFile.php',
7 => dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'MyRelativePath',
),
),
array(
'class' => 'IncludePathListener',
'file' => __FILE__,
'arguments' => array(),
),
array(
'class' => 'CompactArgumentsListener',
'file' => '/CompactArgumentsListener.php',
'arguments' => array(
0 => 42,
),
),
), $this->configuration
->getListenerConfiguration());
ini_set('include_path', $includePath);
}