98% of 53OPs |
100% of 8Lines |
83% of 6Branches |
100% of 4Paths |
Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
---|---|---|---|---|---|---|---|---|
mageekguy\atoum\report\fields\runner\tests\duration::getValue() | 6 | 100% | 1 | 100% | 1 | 100% | 1 | 100% |
mageekguy\atoum\report\fields\runner\tests\duration::getTestNumber() | 6 | 100% | 1 | 100% | 1 | 100% | 1 | 100% |
mageekguy\atoum\report\fields\runner\tests\duration::handleEvent() | 41 | 98% | 6 | 100% | 4 | 75% | 2 | 100% |
# | |
---|---|
1 |
<?php |
2 |
|
3 |
namespace mageekguy\atoum\report\fields\runner\tests; |
4 |
|
5 |
use |
6 |
mageekguy\atoum, |
7 |
mageekguy\atoum\report, |
8 |
mageekguy\atoum\runner |
9 |
; |
10 |
|
11 |
abstract class duration extends report\field |
12 |
{ |
13 |
protected $value = null; |
14 |
protected $testNumber = null; |
15 |
|
16 |
public function __construct() |
17 |
{ |
18 |
parent::__construct(array(runner::runStop)); |
19 |
} |
20 |
|
21 |
public function getValue()100% |
22 |
{ |
23 |
return $this->value; |
24 |
} |
25 |
|
26 |
public function getTestNumber()100% |
27 |
{ |
28 |
return $this->testNumber; |
29 |
} |
30 |
|
31 |
public function handleEvent($event, atoum\observable $observable)100% |
32 |
{ |
33 |
if (parent::handleEvent($event, $observable) === false) |
34 |
{ |
35 |
return false; |
36 |
} |
37 |
else |
38 |
{ |
39 |
$this->value = $observable->getScore()->getTotalDuration(); |
40 |
$this->testNumber = $observable->getTestNumber(); |
41 |
|
42 |
return true; |
43 |
} |
44 |
} |
45 |
} |