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

FileNoPathTest   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 123
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 27
dl 0
loc 123
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A constructNoParams() 0 7 1
A assertExceptionOnLoadContentsWhenNoPathSet() 0 5 1
A assertExceptionOnGetFileInfoWhenNoPathSet() 0 5 1
A canUpdatePath() 0 6 1
A assertExceptionOnGetFileObjectWhenNoPathSet() 0 5 1
A assertExceptionOnCreateWhenNoPathSet() 0 5 1
A assertExceptionOnPutContentsWhenNoPathSet() 0 5 1
A assertExceptionOnGetObjectWhenNoPathSet() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Small\CodeGeneration\Filesystem;
4
5
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\File;
6
use EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException;
7
use PHPUnit\Framework\TestCase;
8
9
/**
10
 * @covers \EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\File
11
 * @covers \EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\AbstractFilesystemItem
12
 */
13
class FileNoPathTest extends TestCase
14
{
15
16
    /**
17
     * @test
18
     * @small
19
     *
20
     */
21
    public function canUpdatePath(): void
22
    {
23
        $object = new File();
24
        $path   = '/path/to/nowhere';
25
        $object->setPath($path);
26
        self::assertSame($path, $object->getPath());
27
    }
28
29
    /**
30
     * @test
31
     * @small
32
     */
33
    public function constructNoParams(): File
34
    {
35
        $object = new File();
36
        self::assertNull($object->getPath());
37
        self::assertNull($object->getContents());
38
39
        return $object;
40
    }
41
42
    /**
43
     * @test
44
     * @small
45
     * @depends constructNoParams
46
     *
47
     * @param File $object
48
     *
49
     * @throws DoctrineStaticMetaException
50
     */
51
    public function assertExceptionOnGetObjectWhenNoPathSet(File $object): void
52
    {
53
        $this->expectException(DoctrineStaticMetaException::class);
54
        $this->expectExceptionMessage('$this->path is not set');
55
        $object->getSplFileInfo();
56
    }
57
58
    /**
59
     * @test
60
     * @small
61
     * @depends constructNoParams
62
     *
63
     * @param File $object
64
     *
65
     * @throws DoctrineStaticMetaException
66
     */
67
    public function assertExceptionOnCreateWhenNoPathSet(File $object): void
68
    {
69
        $this->expectException(DoctrineStaticMetaException::class);
70
        $this->expectExceptionMessage('$this->path is not set');
71
        $object->create();
72
    }
73
74
    /**
75
     * @test
76
     * @small
77
     * @depends constructNoParams
78
     *
79
     * @param File $object
80
     *
81
     * @throws DoctrineStaticMetaException
82
     */
83
    public function assertExceptionOnLoadContentsWhenNoPathSet(File $object): void
84
    {
85
        $this->expectException(DoctrineStaticMetaException::class);
86
        $this->expectExceptionMessage('$this->path is not set');
87
        $object->loadContents();
88
    }
89
90
    /**
91
     * @test
92
     * @small
93
     * @depends constructNoParams
94
     *
95
     * @param File $object
96
     *
97
     * @throws DoctrineStaticMetaException
98
     */
99
    public function assertExceptionOnPutContentsWhenNoPathSet(File $object): void
100
    {
101
        $this->expectException(DoctrineStaticMetaException::class);
102
        $this->expectExceptionMessage('$this->path is not set');
103
        $object->putContents();
104
    }
105
106
    /**
107
     * @test
108
     * @small
109
     * @depends constructNoParams
110
     *
111
     * @param File $object
112
     *
113
     * @throws DoctrineStaticMetaException
114
     */
115
    public function assertExceptionOnGetFileInfoWhenNoPathSet(File $object): void
116
    {
117
        $this->expectException(DoctrineStaticMetaException::class);
118
        $this->expectExceptionMessage('$this->path is not set');
119
        $object->getSplFileInfo();
120
    }
121
122
    /**
123
     * @test
124
     * @small
125
     * @depends constructNoParams
126
     *
127
     * @param File $object
128
     *
129
     * @throws DoctrineStaticMetaException
130
     */
131
    public function assertExceptionOnGetFileObjectWhenNoPathSet(File $object): void
132
    {
133
        $this->expectException(DoctrineStaticMetaException::class);
134
        $this->expectExceptionMessage('$this->path is not set');
135
        $object->getSplFileObject();
136
    }
137
}
138