Issues (1)

tests/InterpreterTest.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author  : Jagepard <[email protected]>
7
 * @license https://mit-license.org/ MIT
8
 */
9
10
namespace Behavioral\Interpreter\Tests;
11
12
use Behavioral\Interpreter\{Album, CardFile, Interpreter, InterpreterInterface};
13
use PHPUnit\Framework\TestCase as PHPUnit_Framework_TestCase;
0 ignored issues
show
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
15
class InterpreterTest extends PHPUnit_Framework_TestCase
16
{
17
    protected InterpreterInterface $interpreter;
18
19
    protected function setUp(): void
20
    {
21
        $cardFile = new CardFile();
22
        $cardFile->addAlbum(new Album("Korn", "Untouchables"));
23
        $cardFile->addAlbum(new Album("Deftones", "Adrenaline"));
24
        $this->interpreter = new Interpreter($cardFile);
25
    }
26
27
    public function testAlbum(): void
28
    {
29
        $this->assertEquals("Deftones\n", $this->interpreter->interpret("author 2"));
30
        $this->assertEquals("Deftones\n", $this->interpreter->interpret("2 author"));
31
    }
32
33
    public function testAuthor(): void
34
    {
35
        $this->assertEquals("Adrenaline\n", $this->interpreter->interpret("album 2"));
36
        $this->assertEquals("Adrenaline\n", $this->interpreter->interpret("2 album"));
37
    }
38
}
39