commit
73a8e2c1ab
|
@ -39,22 +39,7 @@ class ClassMapGeneratorTest extends TestCase
|
|||
$this->markTestSkipped('Test segfaults on travis 5.3.3 due to ClassMap\LongString');
|
||||
}
|
||||
|
||||
$data = array(
|
||||
array(__DIR__.'/Fixtures/Namespaced', array(
|
||||
'Namespaced\\Bar' => realpath(__DIR__).'/Fixtures/Namespaced/Bar.inc',
|
||||
'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php',
|
||||
'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php',
|
||||
)),
|
||||
array(__DIR__.'/Fixtures/beta/NamespaceCollision', array(
|
||||
'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php',
|
||||
'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Foo.php',
|
||||
)),
|
||||
array(__DIR__.'/Fixtures/Pearlike', array(
|
||||
'Pearlike_Foo' => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php',
|
||||
'Pearlike_Bar' => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php',
|
||||
'Pearlike_Baz' => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php',
|
||||
)),
|
||||
array(__DIR__.'/Fixtures/classmap', array(
|
||||
$classmap = array(
|
||||
'Foo\\Bar\\A' => realpath(__DIR__) . '/Fixtures/classmap/sameNsMultipleClasses.php',
|
||||
'Foo\\Bar\\B' => realpath(__DIR__) . '/Fixtures/classmap/sameNsMultipleClasses.php',
|
||||
'Alpha\\A' => realpath(__DIR__) . '/Fixtures/classmap/multipleNs.php',
|
||||
|
@ -73,7 +58,34 @@ class ClassMapGeneratorTest extends TestCase
|
|||
'Foo\\SlashedA' => realpath(__DIR__) . '/Fixtures/classmap/BackslashLineEndingString.php',
|
||||
'Foo\\SlashedB' => realpath(__DIR__) . '/Fixtures/classmap/BackslashLineEndingString.php',
|
||||
'Unicode\\↑\\↑' => realpath(__DIR__) . '/Fixtures/classmap/Unicode.php',
|
||||
'ShortOpenTag' => realpath(__DIR__) . '/Fixtures/classmap/ShortOpenTag.php',
|
||||
'ShortOpenTagDocblock' => realpath(__DIR__) . '/Fixtures/classmap/ShortOpenTagDocblock.php',
|
||||
);
|
||||
|
||||
/**
|
||||
* @wontfix If short_open_tag is not enabled, we end up parsing the docblock because
|
||||
* php_strip_whitespace won't recognize the file. Funky edge-case (does not apply to HHVM).
|
||||
*/
|
||||
if (!defined('HHVM_VERSION') && !ini_get('short_open_tag')) {
|
||||
$classmap['description'] = realpath(__DIR__) . '/Fixtures/classmap/ShortOpenTagDocblock.php';
|
||||
}
|
||||
|
||||
$data = array(
|
||||
array(__DIR__ . '/Fixtures/Namespaced', array(
|
||||
'Namespaced\\Bar' => realpath(__DIR__) . '/Fixtures/Namespaced/Bar.inc',
|
||||
'Namespaced\\Foo' => realpath(__DIR__) . '/Fixtures/Namespaced/Foo.php',
|
||||
'Namespaced\\Baz' => realpath(__DIR__) . '/Fixtures/Namespaced/Baz.php',
|
||||
)),
|
||||
array(__DIR__ . '/Fixtures/beta/NamespaceCollision', array(
|
||||
'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__) . '/Fixtures/beta/NamespaceCollision/A/B/Bar.php',
|
||||
'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__) . '/Fixtures/beta/NamespaceCollision/A/B/Foo.php',
|
||||
)),
|
||||
array(__DIR__ . '/Fixtures/Pearlike', array(
|
||||
'Pearlike_Foo' => realpath(__DIR__) . '/Fixtures/Pearlike/Foo.php',
|
||||
'Pearlike_Bar' => realpath(__DIR__) . '/Fixtures/Pearlike/Bar.php',
|
||||
'Pearlike_Baz' => realpath(__DIR__) . '/Fixtures/Pearlike/Baz.php',
|
||||
)),
|
||||
array(__DIR__ . '/Fixtures/classmap', $classmap),
|
||||
array(__DIR__ . '/Fixtures/template', array()),
|
||||
);
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<?
|
||||
|
||||
class ShortOpenTag {}
|
|
@ -0,0 +1,5 @@
|
|||
<?
|
||||
/**
|
||||
* Some class description here.
|
||||
*/
|
||||
class ShortOpenTagDocblock {}
|
Loading…
Reference in New Issue