Suite   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 35
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getFunctions() 0 4 1
A getTestCount() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ParaTest\Runners\PHPUnit;
6
7
/**
8
 * Class Suite.
9
 *
10
 * A suite represents an entire PHPUnit Test Suite
11
 * object - this class is essentially used for running
12
 * entire test classes in parallel
13
 */
14
class Suite extends ExecutableTest
15
{
16
    /**
17
     * A collection of test methods.
18
     *
19
     * @var array
20
     */
21
    private $functions;
22
23 57
    public function __construct(string $path, array $functions, string $fullyQualifiedClassName = null)
24
    {
25 57
        parent::__construct($path, $fullyQualifiedClassName);
26 57
        $this->functions = $functions;
27 57
    }
28
29
    /**
30
     * Return the collection of test methods.
31
     *
32
     * @return array
33
     */
34 4
    public function getFunctions(): array
35
    {
36 4
        return $this->functions;
37
    }
38
39
    /**
40
     * Get the expected count of tests to be executed.
41
     *
42
     * @return int
43
     */
44 15
    public function getTestCount(): int
45
    {
46 15
        return count($this->functions);
47
    }
48
}
49