mageekguy\atoum\test\adapter\call\decorator: lines coverage

100% of 79

OPs

100% of 19

Lines

91% of 11

Branches

100% of 6

Paths
Method OPs OPs % Lines Line % Branches Branches % Paths Path %
mageekguy\atoum\test\adapter\call\decorator::__construct() 8 100% 2 100% 1 0% 1 100%
mageekguy\atoum\test\adapter\call\decorator::getArgumentsDecorator() 6 100% 1 100% 1 100% 1 100%
mageekguy\atoum\test\adapter\call\decorator::setArgumentsDecorator() 16 100% 2 100% 1 100% 1 100%
mageekguy\atoum\test\adapter\call\decorator::decorate() 49 100% 14 100% 8 100% 3 100%
#
1
<?php
2

                    
3
namespace mageekguy\atoum\test\adapter\call;
4

                    
5
use
6
	mageekguy\atoum\test\adapter\call,
7
	mageekguy\atoum\test\adapter\call\arguments
8
;
9

                    
10
class decorator
11
{
12
	protected $argumentsDecorator = null;
13

                    
14
	public function __construct()100%
15
	{
16
		$this->setArgumentsDecorator();
17
	}
18

                    
19
	public function getArgumentsDecorator()100%
20
	{
21
		return $this->argumentsDecorator;
22
	}
23

                    
24
	public function setArgumentsDecorator(arguments\decorator $decorator = null)100%
25
	{
26
		$this->argumentsDecorator = $decorator ?: new arguments\decorator();
27

                    
28
		return $this;
29
	}
30

                    
31
	public function decorate(call $call)100%
32
	{
33
		$string = '';
34

                    
35
		$function = $call->getFunction();
36

                    
37
		if ($function !== null)
38
		{
39
			$string = $function . '(';
40

                    
41
			$arguments = $call->getArguments();
42

                    
43
			if ($arguments === null)
44
			{
45
				$string .= '*';
46
			}
47
			else
48
			{
49
				$string .= $this->argumentsDecorator->decorate($call->getArguments());
50
			}
51

                    
52
			$string .= ')';
53
		}
54

                    
55
		return $string;
56
	}
57
}