78% of 80OPs |
100% of 16Lines |
65% of 17Branches |
33% of 9Paths |
Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
---|---|---|---|---|---|---|---|---|
mageekguy\atoum\reports\realtime::handleEvent() | 38 | 79% | 9 | 100% | 9 | 67% | 4 | 25% |
mageekguy\atoum\reports\realtime::addWriter() | 11 | 100% | 2 | 100% | 1 | 100% | 1 | 100% |
mageekguy\atoum\reports\realtime::isOverridableBy() | 10 | 100% | 1 | 100% | 1 | 100% | 1 | 100% |
mageekguy\atoum\reports\realtime::write() | 21 | 52% | 4 | 100% | 6 | 50% | 3 | 0% |
# | |
---|---|
1 |
<?php |
2 |
|
3 |
namespace mageekguy\atoum\reports; |
4 |
|
5 |
use |
6 |
mageekguy\atoum, |
7 |
mageekguy\atoum\report |
8 |
; |
9 |
|
10 |
abstract class realtime extends atoum\report |
11 |
{ |
12 |
public function handleEvent($event, atoum\observable $observable)100% |
13 |
{ |
14 |
parent::handleEvent($event, $observable)->write($event); |
15 |
|
16 |
if ($event === atoum\runner::runStop) |
17 |
{ |
18 |
foreach ($this->writers as $writer) |
19 |
{ |
20 |
$writer->reset(); |
21 |
} |
22 |
} |
23 |
|
24 |
return $this; |
25 |
} |
26 |
|
27 |
public function addWriter(report\writers\realtime $writer) |
28 |
{ |
29 |
return $this->doAddWriter($writer); |
30 |
} |
31 |
|
32 |
public function isOverridableBy(report $report)100% |
33 |
{ |
34 |
return ($report instanceof self) === false; |
35 |
} |
36 |
|
37 |
protected function write($event)100% |
38 |
{ |
39 |
foreach ($this->writers as $writer) |
40 |
{ |
41 |
$writer->writeRealtimeReport($this, $event); |
42 |
} |
43 |
|
44 |
return $this; |
45 |
} |
46 |
} |