mageekguy\atoum\asserters\adapter: lines coverage

82% of 162

OPs

90% of 20

Lines

67% of 24

Branches

79% of 14

Paths
Method OPs OPs % Lines Line % Branches Branches % Paths Path %
mageekguy\atoum\asserters\adapter::__get() 39 95% 7 100% 9 78% 3 67%
mageekguy\atoum\asserters\adapter::call() 11 100% 1 100% 1 100% 1 100%
mageekguy\atoum\asserters\adapter::withArguments() 14 100% 1 100% 1 100% 1 100%
mageekguy\atoum\asserters\adapter::withIdenticalArguments() 14 0% 1 0% 1 0% 1 0%
mageekguy\atoum\asserters\adapter::withAtLeastArguments() 11 100% 1 100% 1 100% 1 100%
mageekguy\atoum\asserters\adapter::withAtLeastIdenticalArguments() 11 0% 1 0% 1 0% 1 0%
mageekguy\atoum\asserters\adapter::withAnyArguments() 9 100% 1 100% 1 100% 1 100%
mageekguy\atoum\asserters\adapter::withoutAnyArgument() 11 100% 1 100% 1 100% 1 100%
mageekguy\atoum\asserters\adapter::adapterIsSet() 21 95% 3 100% 4 50% 2 100%
mageekguy\atoum\asserters\adapter::callIsSet() 21 95% 3 100% 4 50% 2 100%
#
1
<?php
2

                    
3
namespace mageekguy\atoum\asserters;
4

                    
5
use
6
	mageekguy\atoum,
7
	mageekguy\atoum\php,
8
	mageekguy\atoum\test,
9
	mageekguy\atoum\asserter,
10
	mageekguy\atoum\asserters\adapter\call,
11
	mageekguy\atoum\asserters\adapter\exceptions
12
;
13

                    
14
class adapter extends adapter\call
15
{
16
	public function __get($property)100%
17
	{
18
		switch (strtolower($property))
19
		{
20
			case 'withanyarguments':
21
			case 'withoutanyargument':
22
				return $this->{$property}();
23

                    
24
			default:
25
				return parent::__get($property);
26
		}
27
	}
28

                    
29
	public function call($function)100%
30
	{
31
		return $this->setFunction($function);
32
	}
33

                    
34
	public function withArguments()100%
35
	{
36
		return $this->setArguments(func_get_args());
37
	}
38

                    
39
	public function withIdenticalArguments()0%
40
	{
41
		return $this->setIdenticalArguments(func_get_args());
42
	}
43

                    
44
	public function withAtLeastArguments(array $arguments)100%
45
	{
46
		return $this->setArguments($arguments);
47
	}
48

                    
49
	public function withAtLeastIdenticalArguments(array $arguments)0%
50
	{
51
		return $this->setIdenticalArguments($arguments);
52
	}
53

                    
54
	public function withAnyArguments()100%
55
	{
56
		return $this->unsetArguments();
57
	}
58

                    
59
	public function withoutAnyArgument()100%
60
	{
61
		return $this->withAtLeastArguments(array());
62
	}
63

                    
64
	protected function adapterIsSet()100%
65
	{
66
		try
67
		{
68
			return parent::adapterIsSet();
69
		}
70
		catch (call\exceptions\logic $exception)
71
		{
72
			throw new exceptions\logic('Adapter is undefined');
73
		}
74
	}
75

                    
76
	protected function callIsSet()100%
77
	{
78
		try
79
		{
80
			return parent::callIsSet();
81
		}
82
		catch (call\exceptions\logic $exception)
83
		{
84
			throw new exceptions\logic('Call is undefined');
85
		}
86
	}
87
}