Passed
Push — master ( 283bfd...df9032 )
by Aimeos
04:29
created

StandardTest::testBodyException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 13
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2019-2022
6
 */
7
8
9
namespace Aimeos\Client\Html\Catalog\Home;
10
11
12
class StandardTest extends \PHPUnit\Framework\TestCase
13
{
14
	private $object;
15
	private $context;
16
	private $view;
17
18
19
	protected function setUp() : void
20
	{
21
		$this->view = \TestHelperHtml::view();
22
		$this->context = \TestHelperHtml::context();
23
24
		$this->object = new \Aimeos\Client\Html\Catalog\Home\Standard( $this->context );
25
		$this->object->setView( $this->view );
26
	}
27
28
29
	protected function tearDown() : void
30
	{
31
		unset( $this->object, $this->context, $this->view );
32
	}
33
34
35
	public function testHeader()
36
	{
37
		$tags = [];
38
		$expire = null;
39
40
		$this->object->setView( $this->object->data( $this->view, $tags, $expire ) );
41
		$output = $this->object->header();
42
43
		$this->assertStringContainsString( '<title>Root | Aimeos</title>', $output );
44
	}
45
46
47
	public function testBody()
48
	{
49
		$tags = [];
50
		$expire = null;
51
52
		$this->object->setView( $this->object->data( $this->view, $tags, $expire ) );
53
		$output = $this->object->body();
54
55
		$this->assertStringContainsString( 'root', $output );
56
	}
57
}
58