Completed
Push — master ( cc87a0...64b84e )
by Aimeos
07:07
created

StandardTest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 49
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 8 1
A tearDown() 0 4 1
A testGetHeader() 0 5 1
A testGetBody() 0 5 1
A testGetSubClientInvalid() 0 5 1
A testGetSubClientInvalidName() 0 5 1
1
<?php
2
3
namespace Aimeos\Client\Html\Account\History\Order\Detail;
4
5
6
/**
7
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
8
 * @copyright Aimeos (aimeos.org), 2016
9
 */
10
class StandardTest extends \PHPUnit_Framework_TestCase
11
{
12
	private $object;
13
	private $context;
14
15
16
	protected function setUp()
17
	{
18
		$paths = \TestHelperHtml::getHtmlTemplatePaths();
19
		$this->context = clone \TestHelperHtml::getContext();
20
21
		$this->object = new \Aimeos\Client\Html\Account\History\Order\Detail\Standard( $this->context, $paths );
22
		$this->object->setView( \TestHelperHtml::getView() );
23
	}
24
25
26
	protected function tearDown()
27
	{
28
		unset( $this->object );
29
	}
30
31
32
	public function testGetHeader()
33
	{
34
		$this->setExpectedException( '\Aimeos\MW\View\Exception' );
35
		$this->object->getHeader();
36
	}
37
38
39
	public function testGetBody()
40
	{
41
		$this->setExpectedException( '\Aimeos\MW\View\Exception' );
42
		$this->object->getBody();
43
	}
44
45
46
	public function testGetSubClientInvalid()
47
	{
48
		$this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' );
49
		$this->object->getSubClient( 'invalid', 'invalid' );
50
	}
51
52
53
	public function testGetSubClientInvalidName()
54
	{
55
		$this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' );
56
		$this->object->getSubClient( '$$$', '$$$' );
57
	}
58
}
59