Passed
Push — master ( bae6ce...385af2 )
by Tim
01:33
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 as State;
6
use \SimpleSAML\Module\monitor\TestConfiguration as TestConfiguration;
7
use \SimpleSAML\Module\monitor\TestCase as TestCase;
8
use \SimpleSAML\Module\monitor\TestData as TestData;
9
use \SimpleSAML\Module\monitor\TestResult as TestResult;
10
use \SimpleSAML\Module\monitor\TestSuite\Store as Store;
11
12
final class Files extends \SimpleSAML\Module\monitor\TestSuiteFactory
13
{
14
    /**
15
     * @param TestConfiguration $configuration
16
     */
17
    public function __construct($configuration)
18
    {
19
        $this->setCategory('PHP sessions');
20
        parent::__construct($configuration);
21
    }
22
23
    /**
24
     * @return void
25
     */
26
    public function invokeTest()
27
    {
28
        $input = [
29
            'path' => session_save_path(),
30
            'category' => 'Session storage'
31
        ];
32
        $testData = new TestData($input);
33
34
        $test = new TestCase\FileSystem\FreeSpace($testData);
35
        $testResult = $test->getTestResult();
36
37
        $this->addTestResult($testResult);
38
        $this->setTestResult($testResult);
39
    }
40
}
41