Passed
Push — master ( bae6ce...385af2 )
by Tim
01:33
created

Files   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A invokeTest() 0 13 1
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