File
- drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php, line 219
Class
- KernelTest
Namespace
Symfony\Component\HttpKernel\Tests
Code
public function testStripComments() {
if (!function_exists('token_get_all')) {
$this
->markTestSkipped('The function token_get_all() is not available.');
return;
}
$source = <<<EOF
<?php
/**
* some class comments to strip
*/
class TestClass
{
/**
* some method comments to strip
*/
public function doStuff()
{
// inline comment
}
}
EOF;
$expected = <<<EOF
<?php
class TestClass
{
public function doStuff()
{
}
}
EOF;
$this
->assertEquals($expected, Kernel::stripComments($source));
}