| @@ 48-58 (lines=11) @@ | ||
| 45 | * |
|
| 46 | * @return void |
|
| 47 | */ |
|
| 48 | public function testHas() |
|
| 49 | { |
|
| 50 | $this->fileSystem |
|
| 51 | ->expects($this->once()) |
|
| 52 | ->method('has') |
|
| 53 | ->willReturn(true); |
|
| 54 | ||
| 55 | $manager = new FileManager($this->fileSystem, $this->fileDocumentFactory); |
|
| 56 | ||
| 57 | $this->assertTrue($manager->has('myKey')); |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Verifies the correct behavior of read method |
|
| @@ 65-75 (lines=11) @@ | ||
| 62 | * |
|
| 63 | * @return void |
|
| 64 | */ |
|
| 65 | public function testRead() |
|
| 66 | { |
|
| 67 | $this->fileSystem |
|
| 68 | ->expects($this->once()) |
|
| 69 | ->method('read') |
|
| 70 | ->willReturn('myData'); |
|
| 71 | ||
| 72 | $manager = new FileManager($this->fileSystem, $this->fileDocumentFactory); |
|
| 73 | ||
| 74 | $this->assertEquals('myData', $manager->read('myKey')); |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * Verifies the correct behavior of read method |
|
| @@ 82-92 (lines=11) @@ | ||
| 79 | * |
|
| 80 | * @return void |
|
| 81 | */ |
|
| 82 | public function testDelete() |
|
| 83 | { |
|
| 84 | $this->fileSystem |
|
| 85 | ->expects($this->once()) |
|
| 86 | ->method('delete') |
|
| 87 | ->willReturn(true); |
|
| 88 | ||
| 89 | $manager = new FileManager($this->fileSystem, $this->fileDocumentFactory); |
|
| 90 | ||
| 91 | $this->assertTrue($manager->delete('myKey')); |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Verifies the correct behavior of the FileManager |
|