Completed
Pull Request — master (#204)
by
unknown
02:26
created

Suite::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
crap 1
1
<?php namespace ParaTest\Runners\PHPUnit;
2
3
/**
4
 * Class Suite
5
 *
6
 * A suite represents an entire PHPUnit Test Suite
7
 * object - this class is essentially used for running
8
 * entire test classes in parallel
9
 *
10
 * @package ParaTest\Runners\PHPUnit
11
 */
12
class Suite extends ExecutableTest
13
{
14
    /**
15
     * A collection of test methods
16
     *
17
     * @var array
18
     */
19
    private $functions;
20
21 58
    public function __construct($path, $functions, $fullyQualifiedClassName = null)
22
    {
23 58
        parent::__construct($path, $fullyQualifiedClassName);
24 58
        $this->functions = $functions;
25 58
    }
26
27
    /**
28
     * Return the collection of test methods
29
     *
30
     * @return array
31
     */
32 4
    public function getFunctions()
33
    {
34 4
        return $this->functions;
35
    }
36
37
    /**
38
     * Get the expected count of tests to be executed
39
     *
40
     * @return int
41
     */
42 15
    public function getTestCount()
43
    {
44 15
        return count($this->functions);
45
    }
46
}
47