public function Util_TestTest::testGetProvidedDataRegEx in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/tests/Util/TestTest.php \Util_TestTest::testGetProvidedDataRegEx()
@coversNothing @todo This test does not really test functionality of PHPUnit_Util_Test
File
- vendor/
phpunit/ phpunit/ tests/ Util/ TestTest.php, line 235
Class
- Util_TestTest
- @since Class available since Release 3.3.6
Code
public function testGetProvidedDataRegEx() {
$result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider method', $matches);
$this
->assertEquals(1, $result);
$this
->assertEquals('method', $matches[1]);
$result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider class::method', $matches);
$this
->assertEquals(1, $result);
$this
->assertEquals('class::method', $matches[1]);
$result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider namespace\\class::method', $matches);
$this
->assertEquals(1, $result);
$this
->assertEquals('namespace\\class::method', $matches[1]);
$result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider namespace\\namespace\\class::method', $matches);
$this
->assertEquals(1, $result);
$this
->assertEquals('namespace\\namespace\\class::method', $matches[1]);
$result = preg_match(PHPUnit_Util_Test::REGEX_DATA_PROVIDER, '@dataProvider メソッド', $matches);
$this
->assertEquals(1, $result);
$this
->assertEquals('メソッド', $matches[1]);
}