public function PHP_Token_ClassTest::testAnonymousClassesAreHandledCorrectly2 in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/php-token-stream/tests/Token/ClassTest.php \PHP_Token_ClassTest::testAnonymousClassesAreHandledCorrectly2()
@requires PHP 7 @ticket https://github.com/sebastianbergmann/php-token-stream/issues/52
File
- vendor/
phpunit/ php-token-stream/ tests/ Token/ ClassTest.php, line 101
Class
- PHP_Token_ClassTest
- Tests for the PHP_Token_CLASS class.
Code
public function testAnonymousClassesAreHandledCorrectly2() {
$ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_that_declares_anonymous_class2.php');
$classes = $ts
->getClasses();
$this
->assertEquals(array(
'Test',
), array_keys($classes));
$this
->assertEquals(array(
'methodOne',
'methodTwo',
), array_keys($classes['Test']['methods']));
$this
->assertEmpty($ts
->getFunctions());
}