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

100% of 106

OPs

100% of 12

Lines

92% of 13

Branches

78% of 9

Paths
Method OPs OPs % Lines Line % Branches Branches % Paths Path %
mageekguy\atoum\report\fields\runner\atoum\cli::__construct() 18 100% 5 100% 1 0% 1 100%
mageekguy\atoum\report\fields\runner\atoum\cli::__toString() 44 100% 1 100% 8 100% 4 50%
mageekguy\atoum\report\fields\runner\atoum\cli::setPrompt() 16 100% 2 100% 1 100% 1 100%
mageekguy\atoum\report\fields\runner\atoum\cli::getPrompt() 6 100% 1 100% 1 100% 1 100%
mageekguy\atoum\report\fields\runner\atoum\cli::setColorizer() 16 100% 2 100% 1 100% 1 100%
mageekguy\atoum\report\fields\runner\atoum\cli::getColorizer() 6 100% 1 100% 1 100% 1 100%
#
1
<?php
2

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

                    
5
use
6
	mageekguy\atoum,
7
	mageekguy\atoum\report,
8
	mageekguy\atoum\cli\prompt,
9
	mageekguy\atoum\cli\colorizer
10
;
11

                    
12
class cli extends report\fields\runner\atoum
13
{
14
	protected $prompt = null;
15
	protected $colorizer = null;
16

                    
17
	public function __construct()100%
18
	{
19
		parent::__construct();
20

                    
21
		$this
22
			->setPrompt()
23
			->setColorizer()
24
		;
25
	}
26

                    
27
	public function __toString()100%
28
	{
29
		return ($this->author === null || $this->version === null ? '' : $this->prompt . $this->colorizer->colorize(sprintf($this->locale->_('atoum version %s by %s (%s)'), $this->version, $this->author, $this->path)) . PHP_EOL);
30
	}
31

                    
32
	public function setPrompt(prompt $prompt = null)100%
33
	{
34
		$this->prompt = $prompt ?: new prompt;
35

                    
36
		return $this;
37
	}
38

                    
39
	public function getPrompt()100%
40
	{
41
		return $this->prompt;
42
	}
43

                    
44
	public function setColorizer(colorizer $colorizer = null)100%
45
	{
46
		$this->colorizer = $colorizer ?: new colorizer();
47

                    
48
		return $this;
49
	}
50

                    
51
	public function getColorizer()100%
52
	{
53
		return $this->colorizer;
54
	}
55
}