Passed
Branch monitor-2.5.x (8b654c)
by Tim
01:31
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;
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