/** * @test */ public function openResolves40CharacterLongPackageKeysUsingThePackageManager() { $packageKey = 'Some.PackageKey.Containing.40.Characters'; mkdir('vfs://Foo/Some/'); file_put_contents('vfs://Foo/Some/Path', 'fixture'); $this->mockPackageManager->expects($this->once())->method('isPackageAvailable')->with($packageKey)->will($this->returnValue(TRUE)); $mockPackage = $this->getMockBuilder(PackageInterface::class)->getMock(); $mockPackage->expects($this->any())->method('getResourcesPath')->will($this->returnValue('vfs://Foo')); $this->mockPackageManager->expects($this->once())->method('getPackage')->with($packageKey)->will($this->returnValue($mockPackage)); $openedPathAndFilename = ''; $this->assertTrue($this->resourceStreamWrapper->open('resource://' . $packageKey . '/Some/Path', 'r', 0, $openedPathAndFilename)); }