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