Completed
Push — master ( 702095...b9dfd2 )
by Aimeos
02:26
created

EzpublishTest   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 7
c 3
b 0
f 1
lcom 1
cbo 2
dl 0
loc 48
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A tearDown() 0 4 1
A testCleanup() 0 4 1
A testDeleteItems() 0 4 1
A testGetSearchAttributes() 0 9 2
A testGetSubManager() 0 5 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\Customer\Manager\Address;
10
11
12
class EzpublishTest extends \PHPUnit_Framework_TestCase
13
{
14
	private $object;
15
16
17
	protected function setUp()
18
	{
19
		$customer = new \Aimeos\MShop\Customer\Manager\Ezpublish( \TestHelper::getContext() );
20
21
		$this->object = $customer->getSubManager( 'address', 'Ezpublish' );
22
	}
23
24
25
	protected function tearDown()
26
	{
27
		unset( $this->object );
28
	}
29
30
31
	public function testCleanup()
32
	{
33
		$this->object->cleanup( array( -1 ) );
34
	}
35
36
37
	public function testDeleteItems()
38
	{
39
		$this->object->deleteItems( array( -1 ) );
40
	}
41
42
43
	public function testGetSearchAttributes()
44
	{
45
		$attributes = $this->object->getSearchAttributes();
46
		$this->assertGreaterThan( 0, count( $attributes ) );
47
48
		foreach( $attributes as $attribute ) {
49
			$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute );
50
		}
51
	}
52
53
54
	public function testGetSubManager()
55
	{
56
		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
57
		$this->object->getSubManager( 'unknown' );
58
	}
59
}
60