Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | class WriterTest extends TestCase |
||
14 | { |
||
15 | private const WORK_DIR = AbstractTest::VAR_PATH . '/' . AbstractTest::TEST_TYPE_MEDIUM . '/WriterTest'; |
||
16 | |||
17 | public static function setUpBeforeClass() |
||
18 | { |
||
19 | mkdir(self::WORK_DIR, 0777, true); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * @test |
||
24 | * @medium |
||
25 | * @throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException |
||
26 | */ |
||
27 | public function itCanWriteFiles() |
||
28 | { |
||
29 | $file = $this->getFile(); |
||
30 | $this->getWriter()->write($file); |
||
31 | self::assertFileExists($file->getPath()); |
||
32 | self::assertSame($file->getContents(), \ts\file_get_contents($file->getPath())); |
||
33 | } |
||
34 | |||
35 | private function getFile(): File |
||
41 | } |
||
42 | |||
43 | private function getWriter(): Writer |
||
46 | } |
||
47 | } |
||
48 |