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