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

StandardTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Aimeos\Client\Html\Email\Delivery\Html\Summary\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\Email\Delivery\Html\Summary\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