X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fclass-loader%2FTests%2FClassCollectionLoaderTest.php;h=15a11053c6c0b22999127e8f99fa614cc0e7233a;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=4adff9fbfeda3327b783fc2c55591ee156247459;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/class-loader/Tests/ClassCollectionLoaderTest.php b/vendor/symfony/class-loader/Tests/ClassCollectionLoaderTest.php index 4adff9fbf..15a11053c 100644 --- a/vendor/symfony/class-loader/Tests/ClassCollectionLoaderTest.php +++ b/vendor/symfony/class-loader/Tests/ClassCollectionLoaderTest.php @@ -13,17 +13,19 @@ namespace Symfony\Component\ClassLoader\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\ClassLoader\ClassCollectionLoader; +use Symfony\Component\ClassLoader\Tests\Fixtures\DeclaredClass; +use Symfony\Component\ClassLoader\Tests\Fixtures\WarmedClass; require_once __DIR__.'/Fixtures/ClassesWithParents/GInterface.php'; require_once __DIR__.'/Fixtures/ClassesWithParents/CInterface.php'; require_once __DIR__.'/Fixtures/ClassesWithParents/B.php'; require_once __DIR__.'/Fixtures/ClassesWithParents/A.php'; +/** + * @group legacy + */ class ClassCollectionLoaderTest extends TestCase { - /** - * @requires PHP 5.4 - */ public function testTraitDependencies() { require_once __DIR__.'/Fixtures/deps/traits.php'; @@ -95,7 +97,6 @@ class ClassCollectionLoaderTest extends TestCase /** * @dataProvider getDifferentOrdersForTraits - * @requires PHP 5.4 */ public function testClassWithTraitsReordering(array $classes) { @@ -139,9 +140,6 @@ class ClassCollectionLoaderTest extends TestCase ); } - /** - * @requires PHP 5.4 - */ public function testFixClassWithTraitsOrdering() { require_once __DIR__.'/Fixtures/ClassesWithParents/CTrait.php'; @@ -233,7 +231,7 @@ class ClassCollectionLoaderTest extends TestCase } }); - $strictTypes = defined('HHVM_VERSION') ? '' : "\nnamespace {require __DIR__.'/Fixtures/Namespaced/WithStrictTypes.php';}"; + $strictTypes = \defined('HHVM_VERSION') ? '' : "\nnamespace {require __DIR__.'/Fixtures/Namespaced/WithStrictTypes.php';}"; ClassCollectionLoader::load( array('Namespaced\\WithComments', 'Pearlike_WithComments', 'Namespaced\\WithDirMagic', 'Namespaced\\WithFileMagic', 'Namespaced\\WithHaltCompiler', $strictTypes ? 'Namespaced\\WithStrictTypes' : 'Namespaced\\WithComments'), @@ -286,4 +284,36 @@ EOF unlink($file); } + + public function testInline() + { + $this->assertTrue(class_exists(WarmedClass::class, true)); + + @unlink($cache = sys_get_temp_dir().'/inline.php'); + + $classes = array(WarmedClass::class); + $excluded = array(DeclaredClass::class); + + ClassCollectionLoader::inline($classes, $cache, $excluded); + + $this->assertSame(<<<'EOTXT' +