Passed
Push — master ( ffa4cd...db3132 )
by Aimeos
02:35
created

EzpublishTest::testClear()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
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), 2016-2018
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() : void
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() : void
26
	{
27
		unset( $this->object );
28
	}
29
30
31
	public function testClear()
32
	{
33
		$this->assertInstanceOf( \Aimeos\MShop\Common\Manager\Iface::class, $this->object->clear( array( -1 ) ) );
34
	}
35
36
37
	public function testDeleteItems()
38
	{
39
		$this->assertInstanceOf( \Aimeos\MShop\Common\Manager\Iface::class, $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->expectException( '\\Aimeos\\MShop\\Exception' );
57
		$this->object->getSubManager( 'unknown' );
58
	}
59
}
60