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

Suite   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

3 Methods

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