Completed
Push — master ( 2507d2...3b83d2 )
by Aimeos
03:49
created

SitesTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2016
6
 */
7
8
9
namespace Aimeos\Admin\JQAdm\Common\Decorator;
10
11
12
class SitesTest extends \PHPUnit_Framework_TestCase
13
{
14
	private $context;
15
	private $object;
16
17
18
	protected function setUp()
19
	{
20
		$this->context = \TestHelperJqadm::getContext();
21
		$templatePaths = \TestHelperJqadm::getTemplatePaths();
22
23
		$client = new \Aimeos\Admin\JQAdm\Product\Standard( $this->context, $templatePaths );
24
		$this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Sites( $client, $this->context, $templatePaths );
25
	}
26
27
28
	protected function tearDown()
29
	{
30
		unset( $this->object, $this->context );
31
	}
32
33
34
	public function testSetView()
35
	{
36
		$view = \TestHelperJqadm::getView();
37
38
		$this->object->setView( $view );
39
40
		$this->assertInternalType( 'array', $view->sitesList );
41
	}
42
}
43