mageekguy\atoum\report\fields\runner\duration: lines coverage

97% of 36

OPs

100% of 6

Lines

80% of 5

Branches

100% of 3

Paths
Method OPs OPs % Lines Line % Branches Branches % Paths Path %
mageekguy\atoum\report\fields\runner\duration::getValue() 6 100% 1 100% 1 100% 1 100%
mageekguy\atoum\report\fields\runner\duration::handleEvent() 30 97% 5 100% 4 75% 2 100%
#
1
<?php
2

                    
3
namespace mageekguy\atoum\report\fields\runner;
4

                    
5
use
6
	mageekguy\atoum\locale,
7
	mageekguy\atoum\runner,
8
	mageekguy\atoum\report,
9
	mageekguy\atoum\observable
10
;
11

                    
12
abstract class duration extends report\field
13
{
14
	protected $value = 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 handleEvent($event, observable $observable)100%
27
	{
28
		if (parent::handleEvent($event, $observable) === false)
29
		{
30
			return false;
31
		}
32
		else
33
		{
34
			$this->value = $observable->getRunningDuration();
35

                    
36
			return true;
37
		}
38
	}
39
}