public function openResolvesALowerCaseSha1HashUsingTheResourceManager()
{
$sha1Hash = '68ac906495480a3404beee4874ed853a037a7a8f';
$tempFile = tmpfile();
$mockResource = $this->getMockBuilder(PersistentResource::class)->disableOriginalConstructor()->getMock();
$this->mockResourceManager->expects($this->once())->method('getResourceBySha1')->with($sha1Hash)->will($this->returnValue($mockResource));
$this->mockResourceManager->expects($this->once())->method('getStreamByResource')->with($mockResource)->will($this->returnValue($tempFile));
$openedPathAndFilename = '';
$this->assertTrue($this->resourceStreamWrapper->open('resource://' . $sha1Hash, 'r', 0, $openedPathAndFilename));
$this->assertAttributeSame($tempFile, 'handle', $this->resourceStreamWrapper);
}