Passed
Push — master ( bb5c60...87d27f )
by Tim
01:35
created

TestSuiteImplementation   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A prepareTests() 0 14 1
A invokeTest() 0 4 1
1
<?php
2
3
namespace Tests\SimpleSAML\Modules\Monitor\TestFiles;
4
5
use \SimpleSAML\Modules\Monitor\State as State;
0 ignored issues
show
Bug introduced by
The type SimpleSAML\Modules\Monitor\State 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...
6
use \SimpleSAML\Modules\Monitor\TestResult as TestResult;
7
use \SimpleSAML\Modules\Monitor\TestSuiteFactory as TestSuiteFactory;
8
9
class TestSuiteImplementation extends TestSuiteFactory
10
{
11
    public function prepareTests()
12
    {
13
        $a = new TestResult('a', 'b');
14
        $b = new TestResult('c', 'd');
15
        $c = new TestResult('e', 'f');
16
17
        $a->setState(State::ERROR);
18
        $b->setState(State::WARNING);
19
        $c->setState(State::OK);
20
21
        $this->addTestResults([$a, $b]);
22
        $this->addTestResult($c);
23
24
        return [$a, $b, $c];
25
    }
26
27
    public function invokeTest()
28
    {
29
        $this->setCategory('travis');
30
        $this->setSubject('travis');
31
    }
32
}
33