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

ReplaceNameProcessTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A itCanReplaceAName() 0 9 1
A itForcesAnEssOnTheWordSheep() 0 9 1
A getReplaceNameProcess() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Small\CodeGeneration\Creation\Process;
4
5
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Process\ReplaceNameProcess;
6
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\File;
7
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\File\FindReplace;
8
use PHPUnit\Framework\TestCase;
9
10
/**
11
 * @covers \EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Process\ReplaceNameProcess
12
 * @small
13
 */
14
class ReplaceNameProcessTest extends TestCase
15
{
16
    /**
17
     * @test
18
     */
19
    public function itCanReplaceAName(): void
20
    {
21
        $file = new File();
22
        $file->setContents('Blah blah blahs Blahs BLAH BLAHS');
23
        $process = $this->getReplaceNameProcess();
24
        $process->setArgs('blah', 'foo');
25
        $process->run(new FindReplace($file));
26
        $expected = 'Foo foo foos Foos FOO FOOS';
27
        self::assertSame($expected, $file->getContents());
28
    }
29
30
    private function getReplaceNameProcess(): ReplaceNameProcess
31
    {
32
        return new ReplaceNameProcess();
33
    }
34
35
    /**
36
     * @test
37
     */
38
    public function itForcesAnEssOnTheWordSheep(): void
39
    {
40
        $file = new File();
41
        $file->setContents('Blah blah blahs Blahs BLAH BLAHS');
42
        $process = $this->getReplaceNameProcess();
43
        $process->setArgs('blah', 'sheep');
44
        $process->run(new FindReplace($file));
45
        $expected = 'Sheep sheep sheeps Sheeps SHEEP SHEEPS';
46
        self::assertSame($expected, $file->getContents());
47
    }
48
}
49