Add tests to prevent regressions on strings/nowdoc/comment stripping
parent
5a01ada383
commit
de3235a2a4
|
@ -54,6 +54,7 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase
|
|||
'Foo\\LargeClass' => realpath(__DIR__).'/Fixtures/classmap/LargeClass.php',
|
||||
'Foo\\LargeGap' => realpath(__DIR__).'/Fixtures/classmap/LargeGap.php',
|
||||
'Foo\\MissingSpace' => realpath(__DIR__).'/Fixtures/classmap/MissingSpace.php',
|
||||
'Foo\\StripNoise' => realpath(__DIR__).'/Fixtures/classmap/StripNoise.php',
|
||||
'Unicode\\↑\\↑' => realpath(__DIR__).'/Fixtures/classmap/Unicode.php',
|
||||
)),
|
||||
array(__DIR__.'/Fixtures/template', array()),
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace Foo;
|
||||
|
||||
/**
|
||||
* class Fail { }
|
||||
*/
|
||||
class StripNoise
|
||||
{
|
||||
public function test()
|
||||
{
|
||||
return <<<A
|
||||
class Fail2
|
||||
{
|
||||
|
||||
}
|
||||
A
|
||||
. <<<'TEST'
|
||||
class Fail3
|
||||
{
|
||||
|
||||
}
|
||||
TEST;
|
||||
}
|
||||
|
||||
public function test2()
|
||||
{
|
||||
$class = 'class Fail4 {}';
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue