FileTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testWrite() 0 11 1
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