public function setUp()
{
vfsStream::setup('Test');
self::$testClassWasLoaded = false;
$this->classLoader = new ClassLoader();
$this->mockPackage1 = $this->getMockBuilder(Package::class)->disableOriginalConstructor()->getMock();
$this->mockPackage1->expects($this->any())->method('getNamespaces')->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_PSR0]]));
$this->mockPackage2 = $this->getMockBuilder(Package::class)->disableOriginalConstructor()->getMock();
$this->mockPackage2->expects($this->any())->method('getNamespaces')->will($this->returnValue(['Acme\\MyAppAddon']));
$this->mockPackage2->expects($this->any())->method('getPackagePath')->will($this->returnValue('vfs://Test/Packages/Application/Acme.MyAppAddon/'));
$this->mockPackage2->expects($this->any())->method('getFlattenedAutoloadConfiguration')->will($this->returnValue([['namespace' => 'Acme\\MyAppAddon', 'classPath' => 'vfs://Test/Packages/Application/Acme.MyAppAddon/Classes/', 'mappingType' => ClassLoader::MAPPING_TYPE_PSR0]]));
$this->mockPackages = ['Acme.MyApp' => $this->mockPackage1, 'Acme.MyAppAddon' => $this->mockPackage2];
$this->classLoader->setPackages($this->mockPackages);
}