Passed
Push — master ( 63bd60...b32dd7 )
by Johnny
02:10
created

Test   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 27.27%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 44
ccs 3
cts 11
cp 0.2727
rs 10
c 2
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
/**
3
 * Test.php
4
 *
5
 * The abstract class for Tests inside the TestSuite.
6
 *
7
 * PHP version 7.4
8
 *
9
 * @category Core
10
 * @package  RedboxTestSuite
11
 * @author   Johnny Mast <[email protected]>
12
 * @license  https://opensource.org/licenses/MIT MIT
13
 * @link     https://github.com/johnnymast/redbox-testsuite
14
 * @since    GIT:1.0
15
 */
16
17
namespace Redbox\Testsuite;
18
19
/**
20
 * Class Test
21
 *
22
 * @package Redbox\Testsuite
23
 */
24
abstract class Test
25
{
26
    
27
    /**
28 14
     * Instance that keeps track of the score
29
     * for this test.
30 14
     *
31 14
     * @var Score
32
     */
33
    public ?Score $score = null;
34
    
35
    /**
36
     * Test constructor.
37
     *
38
     * Please not tests cant overwrite the function.
39
     */
40
    final function __construct()
41
    {
42
        $this->score = new Score($this);
43
    }
44
    
45
    /**
46
     * Tests must implement this method to indicate
47
     * the minimum score this test can reach.
48
     *
49
     * @return mixed
50
     */
51
    abstract public function minScore();
52
    
53
    /**
54
     * Tests must implement this method to indicate
55
     * the maximum score this test can reach.
56
     *
57
     * @return mixed
58
     */
59
    abstract public function maxScore();
60
    
61
    /**
62
     * Tests must implement this method to start
63
     * running their tests.
64
     *
65
     * @return void
66
     */
67
    abstract public function run();
68
}
69