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

StandardTest::testGetHeader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Aimeos\Client\Html\Checkout\Confirm\Order\Address;
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\Checkout\Confirm\Order\Address\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
		$output = $this->object->getHeader();
35
		$this->assertNotNull( $output );
36
	}
37
38
39
	public function testGetBody()
40
	{
41
		$output = $this->object->getBody();
42
43
		$this->assertStringStartsWith( '<div class="common-summary-address', $output );
44
	}
45
46
47
	public function testGetSubClientInvalid()
48
	{
49
		$this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' );
50
		$this->object->getSubClient( 'invalid', 'invalid' );
51
	}
52
53
54
	public function testGetSubClientInvalidName()
55
	{
56
		$this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' );
57
		$this->object->getSubClient( '$$$', '$$$' );
58
	}
59
}
60