/**
  * @test
  */
 public function classesFromPsr4PackagesAreLoaded()
 {
     $this->mockPackage1->expects($this->any())->method('getAutoloadType')->will($this->returnValue(Package::AUTOLOADER_TYPE_PSR4));
     mkdir('vfs://Test/Packages/Application/Acme.MyApp/Classes', 0770, true);
     file_put_contents('vfs://Test/Packages/Application/Acme.MyApp/Classes/Foo.php', '<?php ' . __CLASS__ . '::$testClassWasLoaded = TRUE; ?>');
     $this->classLoader->setPackages($this->mockPackages, $this->mockPackages);
     $this->classLoader->loadClass('Acme\\MyApp\\Foo');
     $this->assertTrue(self::$testClassWasLoaded);
 }
 /**
  * @test
  */
 public function classesFromPsr4PackagesAreLoaded()
 {
     $this->mockPackage1 = $this->getMockBuilder(\TYPO3\Flow\Package\Package::class)->disableOriginalConstructor()->getMock();
     $this->mockPackage1->expects($this->any())->method('getNamespace')->will($this->returnValue('Acme\\MyApp'));
     $this->mockPackage1->expects($this->any())->method('getPackagePath')->will($this->returnValue('vfs://Test/Packages/Application/Acme.MyApp/'));
     $this->mockPackage1->expects($this->any())->method('getFlattenedAutoloadConfiguration')->will($this->returnValue([['namespace' => 'Acme\\MyApp', 'classPath' => 'vfs://Test/Packages/Application/Acme.MyApp/Classes/', 'mappingType' => ClassLoader::MAPPING_TYPE_PSR4]]));
     mkdir('vfs://Test/Packages/Application/Acme.MyApp/Classes', 0770, true);
     file_put_contents('vfs://Test/Packages/Application/Acme.MyApp/Classes/Foo.php', '<?php ' . __CLASS__ . '::$testClassWasLoaded = TRUE; ?>');
     $this->mockPackages['Acme.MyApp'] = $this->mockPackage1;
     $this->classLoader->setPackages($this->mockPackages);
     $this->classLoader->loadClass('Acme\\MyApp\\Foo');
     $this->assertTrue(self::$testClassWasLoaded);
 }