FileTest::testWrite()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 11
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace SlayerBirden\DFCodeGeneration\Writer;
5
6
use org\bovigo\vfs\vfsStream;
7
use PHPUnit\Framework\TestCase;
8
9
class FileTest extends TestCase
10
{
11
    public function testWrite()
12
    {
13
        $root = vfsStream::setup();
14
15
        $writer = new FileWriter($root->url());
16
17
        $writer->write('hello', 'src/dummy.php');
18
19
        $fName = $root->url() . '/src/dummy.php';
20
        $this->assertFileExists($fName);
21
        $this->assertEquals('hello', file_get_contents($fName));
22
    }
23
}
24