|
@@ 54-60 (lines=7) @@
|
| 51 |
|
* |
| 52 |
|
* @expectedException \Hgraca\Phorensic\SharedKernel\Port\FileSystem\Exception\InvalidPathException |
| 53 |
|
*/ |
| 54 |
|
public function readFile_ThrowsExceptionIfInvalidPath() |
| 55 |
|
{ |
| 56 |
|
$path = 'some/path/to/file'; |
| 57 |
|
$this->fileSystemMock->shouldReceive('readFile')->once()->with($path)->andThrow(InvalidPathException::class); |
| 58 |
|
|
| 59 |
|
$this->adapter->readFile($path); |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
/** |
| 63 |
|
* @test |
|
@@ 69-75 (lines=7) @@
|
| 66 |
|
* |
| 67 |
|
* @expectedException \Hgraca\Phorensic\SharedKernel\Port\FileSystem\Exception\FileNotFoundException |
| 68 |
|
*/ |
| 69 |
|
public function readFile_ThrowsExceptionIfPathNotFound() |
| 70 |
|
{ |
| 71 |
|
$path = 'some/path/to/file'; |
| 72 |
|
$this->fileSystemMock->shouldReceive('readFile')->once()->with($path)->andThrow(FileNotFoundException::class); |
| 73 |
|
|
| 74 |
|
$this->adapter->readFile($path); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
/** |
| 78 |
|
* @dataProvider dataProvider_test_getExtension |