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

EzpublishTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 1
cbo 1
dl 0
loc 33
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A tearDown() 0 4 1
A testGetEzUser() 0 5 1
A testSetEzUser() 0 8 1
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
}