Passed
Push — monitor-3.0.x ( f85cdc...51d4ea )
by Tim
03:29
created

Files::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SimpleSAML\Module\monitor\TestSuite\Store;
4
5
use SimpleSAML\Module\monitor\State;
6
use SimpleSAML\Module\monitor\TestConfiguration;
7
use SimpleSAML\Module\monitor\TestCase;
8
use SimpleSAML\Module\monitor\TestData;
9
use SimpleSAML\Module\monitor\TestResult;
10
use SimpleSAML\Module\monitor\TestSuite\Store;
11
12
final class Files extends \SimpleSAML\Module\monitor\TestSuiteFactory
13
{
14
    /**
15
     * @param \SimpleSAML\Module\monitor\TestConfiguration $configuration
16
     */
17
    public function __construct(TestConfiguration $configuration)
18
    {
19
        $this->setCategory('PHP sessions');
20
        parent::__construct($configuration);
21
    }
22
23
24
    /**
25
     * @return void
26
     */
27
    public function invokeTest(): void
28
    {
29
        $input = [
30
            'path' => session_save_path(),
31
            'category' => 'Session storage'
32
        ];
33
        $testData = new TestData($input);
34
35
        $test = new TestCase\FileSystem\FreeSpace($testData);
36
        $testResult = $test->getTestResult();
37
38
        $this->addTestResult($testResult);
39
        $this->setTestResult($testResult);
40
    }
41
}
42