eZ\Publish\Core\FieldType\Tests\Image\IO\LegacyTest::testLoadBinaryFileDraftInternalPath PHP Метод

testLoadBinaryFileDraftInternalPath() публичный Метод

Load from internal draft binary file path.
    public function testLoadBinaryFileDraftInternalPath()
    {
        $internalId = 'var/test/storage/images-versioned/path/file.jpg';
        $id = 'path/file.jpg';
        $binaryFile = new BinaryFile(array('id' => $id));
        $this->draftIoServiceMock->expects($this->once())->method('getExternalPath')->with($internalId)->will($this->returnValue($id));
        $this->draftIoServiceMock->expects($this->once())->method('loadBinaryFile')->with($id)->will($this->returnValue($binaryFile));
        $this->publishedIoServiceMock->expects($this->never())->method('loadBinaryFile');
        self::assertSame($binaryFile, $this->service->loadBinaryFile($internalId));
    }