GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 75bdf9...8faa57 )
by joseph
83:56 queued 81:04
created

WriterTest::itCanWriteFiles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Medium\CodeGeneration\Filesystem\File;
4
5
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\File;
6
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\File\Writer;
7
use EdmondsCommerce\DoctrineStaticMeta\Tests\Assets\AbstractTest;
8
use PHPUnit\Framework\TestCase;
9
10
/**
11
 * @covers \EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\File\Writer
12
 */
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
36
    {
37
        $file = new File(self::WORK_DIR . '/subdir/file.txt');
38
        $file->setContents('some contents');
39
40
        return $file;
41
    }
42
43
    private function getWriter(): Writer
44
    {
45
        return new Writer();
46
    }
47
}
48