Completed
Push — master ( ac66b3...ab3b6f )
by Aimeos
07:35 queued 01:23
created

EzpublishTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
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\MShop\Context\Item;
10
11
12
class EzpublishTest extends \PHPUnit_Framework_TestCase
13
{
14
	private $object;
15
16
17
	protected function setUp()
18
	{
19
		$this->object = new \Aimeos\MShop\Context\Item\Ezpublish();
20
	}
21
22
23
	protected function tearDown()
24
	{
25
		unset( $this->object );
26
	}
27
28
29
	public function testGetEzUser()
30
	{
31
		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
32
		$this->object->getEzUser();
33
	}
34
35
36
	public function testSetEzUser()
37
	{
38
		$closure = function() {};
39
		$return = $this->object->setEzUser( $closure );
40
41
		$this->assertSame( $closure, $this->object->getEzUser() );
42
		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $return );
43
	}
44
}