public function PHP_Token_InterfaceTest::testGetPackageNamespace in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php \PHP_Token_InterfaceTest::testGetPackageNamespace()
@covers PHP_Token_INTERFACE::getPackage
File
- vendor/
phpunit/ php-token-stream/ tests/ Token/ InterfaceTest.php, line 117
Class
- PHP_Token_InterfaceTest
- Tests for the PHP_Token_INTERFACE class.
Code
public function testGetPackageNamespace() {
$tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php');
foreach ($tokenStream as $token) {
if ($token instanceof PHP_Token_INTERFACE) {
$package = $token
->getPackage();
$this
->assertSame('Foo\\Bar', $package['namespace']);
}
}
}