eZ/Publish/Core/IO/Tests/IOBinarydataHandler/FlysystemTest.php 1 location
|
@@ 109-121 (lines=13) @@
|
| 106 |
|
$this->handler->delete('prefix/my/file.png'); |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
public function testGetContents() |
| 110 |
|
{ |
| 111 |
|
$this->filesystem |
| 112 |
|
->expects($this->once()) |
| 113 |
|
->method('read') |
| 114 |
|
->with('prefix/my/file.png') |
| 115 |
|
->will($this->returnValue('This is my contents')); |
| 116 |
|
|
| 117 |
|
self::assertEquals( |
| 118 |
|
'This is my contents', |
| 119 |
|
$this->handler->getContents('prefix/my/file.png') |
| 120 |
|
); |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
/** |
| 124 |
|
* @expectedException \eZ\Publish\Core\IO\Exception\BinaryFileNotFoundException |
eZ/Publish/Core/IO/Tests/IOMetadataHandler/FlysystemTest.php 1 location
|
@@ 153-162 (lines=10) @@
|
| 150 |
|
self::assertFalse($this->handler->exists('prefix/my/file.png')); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
public function testGetMimeType() |
| 154 |
|
{ |
| 155 |
|
$this->filesystem |
| 156 |
|
->expects($this->once()) |
| 157 |
|
->method('getMimeType') |
| 158 |
|
->with('file.txt') |
| 159 |
|
->will($this->returnValue('text/plain')); |
| 160 |
|
|
| 161 |
|
self::assertEquals('text/plain', $this->handler->getMimeType('file.txt')); |
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
public function testDeleteDirectory() |
| 165 |
|
{ |