eZ\Publish\Core\IO\Tests\IOMetadataHandler\FlysystemTest::testLoad PHP Method

testLoad() public method

public testLoad ( )
    public function testLoad()
    {
        $expectedSpiBinaryFile = new SPIBinaryFile();
        $expectedSpiBinaryFile->id = 'prefix/my/file.png';
        $expectedSpiBinaryFile->size = 123;
        $expectedSpiBinaryFile->mtime = new DateTime('@1307155200');
        $this->filesystem->expects($this->once())->method('getMetadata')->with('prefix/my/file.png')->will($this->returnValue(array('timestamp' => 1307155200, 'size' => 123)));
        $spiBinaryFile = $this->handler->load('prefix/my/file.png');
        $this->assertInstanceOf('eZ\\Publish\\SPI\\IO\\BinaryFile', $spiBinaryFile);
        $this->assertEquals($expectedSpiBinaryFile, $spiBinaryFile);
    }