| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function testWrite() |
||
| 13 | { |
||
| 14 | $fileNameProvider = $this->prophesize(FileNameProviderInterface::class); |
||
| 15 | $fileNameProvider->getFileName(Argument::any())->willReturn('src/dummy.php'); |
||
| 16 | |||
| 17 | $root = vfsStream::setup(); |
||
| 18 | |||
| 19 | $writer = new FileWriter($root->url(), $fileNameProvider->reveal()); |
||
| 20 | |||
| 21 | $writer->write('hello'); |
||
| 22 | |||
| 23 | $fName = $root->url() . '/src/dummy.php'; |
||
| 24 | $this->assertFileExists($fName); |
||
| 25 | $this->assertEquals('hello', file_get_contents($fName)); |
||
| 26 | } |
||
| 28 |