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));
}