Completed
Push — master ( 8d4739...c186e5 )
by Aimeos
01:53
created
lib/custom/src/MW/Filesystem/Manager/Laravel.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 	 * @param \Aimeos\MW\Config\Iface $config Configuration object
32 32
 	 * @param string $tempdir Directory for storing temporary files
33 33
 	 */
34
-	public function __construct( \Illuminate\Filesystem\FilesystemManager $fsm, \Aimeos\MW\Config\Iface $config, $tempdir )
34
+	public function __construct(\Illuminate\Filesystem\FilesystemManager $fsm, \Aimeos\MW\Config\Iface $config, $tempdir)
35 35
 	{
36
-		parent::__construct( $config );
36
+		parent::__construct($config);
37 37
 
38 38
 		$this->fsm = $fsm;
39 39
 		$this->tempdir = $tempdir;
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function __destruct()
47 47
 	{
48
-		foreach( $this->objects as $key => $object ) {
49
-			unset( $this->objects[$key] );
48
+		foreach ($this->objects as $key => $object) {
49
+			unset($this->objects[$key]);
50 50
 		}
51 51
 	}
52 52
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 		$this->objects = [];
62 62
 
63
-		return get_object_vars( $this );
63
+		return get_object_vars($this);
64 64
 	}
65 65
 
66 66
 
@@ -71,19 +71,19 @@  discard block
 block discarded – undo
71 71
 	 * @return \Aimeos\MW\Filesystem\Iface File system object
72 72
 	 * @throws \Aimeos\MW\Filesystem\Exception If an no configuration for that name is found
73 73
 	 */
74
-	public function get( $name )
74
+	public function get($name)
75 75
 	{
76
-		$key = $this->getConfig( $name );
76
+		$key = $this->getConfig($name);
77 77
 
78
-		if( is_string( $key ) )
78
+		if (is_string($key))
79 79
 		{
80
-			if( !isset( $this->objects[$key] ) ) {
81
-				$this->objects[$key] = new \Aimeos\MW\Filesystem\Laravel( $this->fsm->disk( $key ), $this->tempdir );
80
+			if (!isset($this->objects[$key])) {
81
+				$this->objects[$key] = new \Aimeos\MW\Filesystem\Laravel($this->fsm->disk($key), $this->tempdir);
82 82
 			}
83 83
 
84 84
 			return $this->objects[$key];
85 85
 		}
86 86
 
87
-		return parent::get( $name );
87
+		return parent::get($name);
88 88
 	}
89 89
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Property/Type/LaravelTest.php 1 patch
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 		$context = \TestHelper::getContext();
21 21
 		$this->editor = $context->getEditor();
22 22
 
23
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context, 'Laravel' );
24
-		$this->object = $manager->getSubManager( 'property', 'Laravel' )->getSubManager( 'type', 'Laravel' );
23
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($context, 'Laravel');
24
+		$this->object = $manager->getSubManager('property', 'Laravel')->getSubManager('type', 'Laravel');
25 25
 	}
26 26
 
27 27
 
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 
34 34
 	public function testCleanup()
35 35
 	{
36
-		$this->object->cleanup( array( -1 ) );
36
+		$this->object->cleanup(array( -1 ));
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreateItem()
41 41
 	{
42
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Type\\Iface', $this->object->createItem() );
42
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Type\\Iface', $this->object->createItem());
43 43
 	}
44 44
 
45 45
 
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
 	{
48 48
 		$result = $this->object->getResourceType();
49 49
 
50
-		$this->assertContains( 'customer/property/type', $result );
50
+		$this->assertContains('customer/property/type', $result);
51 51
 	}
52 52
 
53 53
 
54 54
 	public function testGetSearchAttributes()
55 55
 	{
56
-		foreach( $this->object->getSearchAttributes() as $attribute ) {
57
-			$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute );
56
+		foreach ($this->object->getSearchAttributes() as $attribute) {
57
+			$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute);
58 58
 		}
59 59
 	}
60 60
 
@@ -63,82 +63,82 @@  discard block
 block discarded – undo
63 63
 	{
64 64
 		$search = $this->object->createSearch();
65 65
 		$conditions = array(
66
-			$search->compare( '==', 'customer.property.type.code', 'newsletter' ),
67
-			$search->compare( '==', 'customer.property.type.editor', $this->editor )
66
+			$search->compare('==', 'customer.property.type.code', 'newsletter'),
67
+			$search->compare('==', 'customer.property.type.editor', $this->editor)
68 68
 		);
69
-		$search->setConditions( $search->combine( '&&', $conditions ) );
69
+		$search->setConditions($search->combine('&&', $conditions));
70 70
 
71
-		$results = $this->object->searchItems( $search );
71
+		$results = $this->object->searchItems($search);
72 72
 
73
-		if( ($expected = reset($results) ) === false )
73
+		if (($expected = reset($results)) === false)
74 74
 		{
75
-			throw new \RuntimeException( 'No property type item found.' );
75
+			throw new \RuntimeException('No property type item found.');
76 76
 		}
77 77
 
78
-		$actual = $this->object->getItem( $expected->getId() );
78
+		$actual = $this->object->getItem($expected->getId());
79 79
 
80
-		$this->assertEquals( $expected, $actual );
80
+		$this->assertEquals($expected, $actual);
81 81
 	}
82 82
 
83 83
 
84 84
 	public function testSaveInvalid()
85 85
 	{
86
-		$this->setExpectedException( '\Aimeos\MW\Common\Exception' );
87
-		$this->object->saveItem( new \Aimeos\MShop\Locale\Item\Standard() );
86
+		$this->setExpectedException('\Aimeos\MW\Common\Exception');
87
+		$this->object->saveItem(new \Aimeos\MShop\Locale\Item\Standard());
88 88
 	}
89 89
 
90 90
 
91 91
 	public function testSaveUpdateDeleteItem()
92 92
 	{
93 93
 		$search = $this->object->createSearch();
94
-		$search->setConditions( $search->compare( '==', 'customer.property.type.editor', $this->editor ) );
94
+		$search->setConditions($search->compare('==', 'customer.property.type.editor', $this->editor));
95 95
 		$results = $this->object->searchItems($search);
96 96
 
97
-		if( ( $item = reset($results) ) === false ) {
98
-			throw new \RuntimeException( 'No type item found' );
97
+		if (($item = reset($results)) === false) {
98
+			throw new \RuntimeException('No type item found');
99 99
 		}
100 100
 
101 101
 		$item->setId(null);
102
-		$item->setCode( 'unitTestSave' );
103
-		$resultSaved = $this->object->saveItem( $item );
104
-		$itemSaved = $this->object->getItem( $item->getId() );
102
+		$item->setCode('unitTestSave');
103
+		$resultSaved = $this->object->saveItem($item);
104
+		$itemSaved = $this->object->getItem($item->getId());
105 105
 
106 106
 		$itemExp = clone $itemSaved;
107
-		$itemExp->setCode( 'unitTestSave2' );
108
-		$resultUpd = $this->object->saveItem( $itemExp );
109
-		$itemUpd = $this->object->getItem( $itemExp->getId() );
107
+		$itemExp->setCode('unitTestSave2');
108
+		$resultUpd = $this->object->saveItem($itemExp);
109
+		$itemUpd = $this->object->getItem($itemExp->getId());
110 110
 
111
-		$this->object->deleteItem( $itemSaved->getId() );
111
+		$this->object->deleteItem($itemSaved->getId());
112 112
 
113 113
 
114
-		$this->assertTrue( $item->getId() !== null );
115
-		$this->assertEquals( $item->getId(), $itemSaved->getId() );
116
-		$this->assertEquals( $item->getSiteId(), $itemSaved->getSiteId() );
117
-		$this->assertEquals( $item->getCode(), $itemSaved->getCode() );
118
-		$this->assertEquals( $item->getDomain(), $itemSaved->getDomain() );
119
-		$this->assertEquals( $item->getLabel(), $itemSaved->getLabel() );
120
-		$this->assertEquals( $item->getStatus(), $itemSaved->getStatus() );
114
+		$this->assertTrue($item->getId() !== null);
115
+		$this->assertEquals($item->getId(), $itemSaved->getId());
116
+		$this->assertEquals($item->getSiteId(), $itemSaved->getSiteId());
117
+		$this->assertEquals($item->getCode(), $itemSaved->getCode());
118
+		$this->assertEquals($item->getDomain(), $itemSaved->getDomain());
119
+		$this->assertEquals($item->getLabel(), $itemSaved->getLabel());
120
+		$this->assertEquals($item->getStatus(), $itemSaved->getStatus());
121 121
 
122
-		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
123
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() );
124
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
122
+		$this->assertEquals($this->editor, $itemSaved->getEditor());
123
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated());
124
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified());
125 125
 
126
-		$this->assertEquals( $itemExp->getId(), $itemUpd->getId() );
127
-		$this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() );
128
-		$this->assertEquals( $itemExp->getCode(), $itemUpd->getCode() );
129
-		$this->assertEquals( $itemExp->getDomain(), $itemUpd->getDomain() );
130
-		$this->assertEquals( $itemExp->getLabel(), $itemUpd->getLabel() );
131
-		$this->assertEquals( $itemExp->getStatus(), $itemUpd->getStatus() );
126
+		$this->assertEquals($itemExp->getId(), $itemUpd->getId());
127
+		$this->assertEquals($itemExp->getSiteId(), $itemUpd->getSiteId());
128
+		$this->assertEquals($itemExp->getCode(), $itemUpd->getCode());
129
+		$this->assertEquals($itemExp->getDomain(), $itemUpd->getDomain());
130
+		$this->assertEquals($itemExp->getLabel(), $itemUpd->getLabel());
131
+		$this->assertEquals($itemExp->getStatus(), $itemUpd->getStatus());
132 132
 
133
-		$this->assertEquals( $this->editor, $itemUpd->getEditor() );
134
-		$this->assertEquals( $itemExp->getTimeCreated(), $itemUpd->getTimeCreated() );
135
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified() );
133
+		$this->assertEquals($this->editor, $itemUpd->getEditor());
134
+		$this->assertEquals($itemExp->getTimeCreated(), $itemUpd->getTimeCreated());
135
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified());
136 136
 
137
-		$this->assertInstanceOf( '\Aimeos\MShop\Common\Item\Iface', $resultSaved );
138
-		$this->assertInstanceOf( '\Aimeos\MShop\Common\Item\Iface', $resultUpd );
137
+		$this->assertInstanceOf('\Aimeos\MShop\Common\Item\Iface', $resultSaved);
138
+		$this->assertInstanceOf('\Aimeos\MShop\Common\Item\Iface', $resultUpd);
139 139
 
140
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
141
-		$this->object->getItem( $itemSaved->getId() );
140
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
141
+		$this->object->getItem($itemSaved->getId());
142 142
 	}
143 143
 
144 144
 
@@ -148,36 +148,36 @@  discard block
 block discarded – undo
148 148
 		$search = $this->object->createSearch();
149 149
 
150 150
 		$expr = [];
151
-		$expr[] = $search->compare( '!=', 'customer.property.type.id', null );
152
-		$expr[] = $search->compare( '!=', 'customer.property.type.siteid', null );
153
-		$expr[] = $search->compare( '==', 'customer.property.type.domain', 'customer' );
154
-		$expr[] = $search->compare( '==', 'customer.property.type.code', 'newsletter' );
155
-		$expr[] = $search->compare( '>', 'customer.property.type.label', '' );
156
-		$expr[] = $search->compare( '>=', 'customer.property.type.position', 0 );
157
-		$expr[] = $search->compare( '==', 'customer.property.type.status', 1 );
158
-		$expr[] = $search->compare( '>=', 'customer.property.type.mtime', '1970-01-01 00:00:00' );
159
-		$expr[] = $search->compare( '>=', 'customer.property.type.ctime', '1970-01-01 00:00:00' );
160
-		$expr[] = $search->compare( '==', 'customer.property.type.editor', $this->editor );
161
-
162
-		$search->setConditions( $search->combine('&&', $expr) );
163
-		$results = $this->object->searchItems( $search, [], $total );
164
-		$this->assertEquals( 1, count( $results ) );
151
+		$expr[] = $search->compare('!=', 'customer.property.type.id', null);
152
+		$expr[] = $search->compare('!=', 'customer.property.type.siteid', null);
153
+		$expr[] = $search->compare('==', 'customer.property.type.domain', 'customer');
154
+		$expr[] = $search->compare('==', 'customer.property.type.code', 'newsletter');
155
+		$expr[] = $search->compare('>', 'customer.property.type.label', '');
156
+		$expr[] = $search->compare('>=', 'customer.property.type.position', 0);
157
+		$expr[] = $search->compare('==', 'customer.property.type.status', 1);
158
+		$expr[] = $search->compare('>=', 'customer.property.type.mtime', '1970-01-01 00:00:00');
159
+		$expr[] = $search->compare('>=', 'customer.property.type.ctime', '1970-01-01 00:00:00');
160
+		$expr[] = $search->compare('==', 'customer.property.type.editor', $this->editor);
161
+
162
+		$search->setConditions($search->combine('&&', $expr));
163
+		$results = $this->object->searchItems($search, [], $total);
164
+		$this->assertEquals(1, count($results));
165 165
 
166 166
 
167 167
 		$search = $this->object->createSearch();
168 168
 		$conditions = array(
169
-			$search->compare( '=~', 'customer.property.type.code', 'newsletter'),
170
-			$search->compare( '==', 'customer.property.type.editor', $this->editor )
169
+			$search->compare('=~', 'customer.property.type.code', 'newsletter'),
170
+			$search->compare('==', 'customer.property.type.editor', $this->editor)
171 171
 		);
172
-		$search->setConditions( $search->combine('&&', $conditions ) );
172
+		$search->setConditions($search->combine('&&', $conditions));
173 173
 		$search->setSlice(0, 1);
174
-		$items = $this->object->searchItems( $search, [], $total);
174
+		$items = $this->object->searchItems($search, [], $total);
175 175
 
176
-		$this->assertEquals( 1, count( $items ) );
177
-		$this->assertEquals( 1, $total );
176
+		$this->assertEquals(1, count($items));
177
+		$this->assertEquals(1, $total);
178 178
 
179
-		foreach($items as $itemId => $item) {
180
-			$this->assertEquals( $itemId, $item->getId() );
179
+		foreach ($items as $itemId => $item) {
180
+			$this->assertEquals($itemId, $item->getId());
181 181
 		}
182 182
 	}
183 183
 
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Property/LaravelTest.php 1 patch
Spacing   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -20,91 +20,91 @@  discard block
 block discarded – undo
20 20
 		$context = \TestHelper::getContext();
21 21
 		$this->editor = $context->getEditor();
22 22
 
23
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context, 'Laravel' );
24
-		$this->object = $manager->getSubManager( 'property', 'Laravel' );
23
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($context, 'Laravel');
24
+		$this->object = $manager->getSubManager('property', 'Laravel');
25 25
 	}
26 26
 
27 27
 
28 28
 	protected function tearDown()
29 29
 	{
30
-		unset( $this->object );
30
+		unset($this->object);
31 31
 	}
32 32
 
33 33
 
34 34
 	public function testCleanup()
35 35
 	{
36
-		$this->object->cleanup( array( -1 ) );
36
+		$this->object->cleanup(array( -1 ));
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreateItem()
41 41
 	{
42 42
 		$item = $this->object->createItem();
43
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Property\\Iface', $item );
43
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Property\\Iface', $item);
44 44
 	}
45 45
 
46 46
 
47 47
 	public function testSaveInvalid()
48 48
 	{
49
-		$this->setExpectedException( '\Aimeos\MW\Common\Exception' );
50
-		$this->object->saveItem( new \Aimeos\MShop\Locale\Item\Standard() );
49
+		$this->setExpectedException('\Aimeos\MW\Common\Exception');
50
+		$this->object->saveItem(new \Aimeos\MShop\Locale\Item\Standard());
51 51
 	}
52 52
 
53 53
 
54 54
 	public function testSaveUpdateDeleteItem()
55 55
 	{
56 56
 		$search = $this->object->createSearch();
57
-		$search->setConditions( $search->compare( '==', 'customer.property.editor', $this->editor ) );
58
-		$results = $this->object->searchItems( $search );
57
+		$search->setConditions($search->compare('==', 'customer.property.editor', $this->editor));
58
+		$results = $this->object->searchItems($search);
59 59
 
60
-		if( ( $item = reset($results) ) === false ) {
61
-			throw new \RuntimeException( 'No property item found' );
60
+		if (($item = reset($results)) === false) {
61
+			throw new \RuntimeException('No property item found');
62 62
 		}
63 63
 
64 64
 		$item->setId(null);
65
-		$item->setLanguageId( 'en' );
66
-		$resultSaved = $this->object->saveItem( $item );
67
-		$itemSaved = $this->object->getItem( $item->getId() );
65
+		$item->setLanguageId('en');
66
+		$resultSaved = $this->object->saveItem($item);
67
+		$itemSaved = $this->object->getItem($item->getId());
68 68
 
69 69
 		$itemExp = clone $itemSaved;
70
-		$itemExp->setValue( 'unittest' );
71
-		$resultUpd = $this->object->saveItem( $itemExp );
72
-		$itemUpd = $this->object->getItem( $itemExp->getId() );
70
+		$itemExp->setValue('unittest');
71
+		$resultUpd = $this->object->saveItem($itemExp);
72
+		$itemUpd = $this->object->getItem($itemExp->getId());
73 73
 
74
-		$this->object->deleteItem( $itemSaved->getId() );
74
+		$this->object->deleteItem($itemSaved->getId());
75 75
 
76 76
 		$context = \TestHelper::getContext();
77 77
 
78
-		$this->assertTrue( $item->getId() !== null );
79
-		$this->assertTrue( $itemSaved->getType() !== null );
80
-		$this->assertEquals( $item->getId(), $itemSaved->getId() );
81
-		$this->assertEquals( $item->getParentId(), $itemSaved->getParentId() );
82
-		$this->assertEquals( $item->getSiteId(), $itemSaved->getSiteId() );
83
-		$this->assertEquals( $item->getTypeId(), $itemSaved->getTypeId() );
84
-		$this->assertEquals( $item->getLanguageId(), $itemSaved->getLanguageId() );
85
-		$this->assertEquals( $item->getValue(), $itemSaved->getValue() );
86
-
87
-		$this->assertEquals( $context->getEditor(), $itemSaved->getEditor() );
88
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() );
89
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
90
-
91
-		$this->assertTrue( $itemUpd->getType() !== null );
92
-		$this->assertEquals( $itemExp->getId(), $itemUpd->getId() );
93
-		$this->assertEquals( $itemExp->getParentId(), $itemUpd->getParentId() );
94
-		$this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() );
95
-		$this->assertEquals( $itemExp->getTypeId(), $itemUpd->getTypeId() );
96
-		$this->assertEquals( $itemExp->getLanguageId(), $itemUpd->getLanguageId() );
97
-		$this->assertEquals( $itemExp->getValue(), $itemUpd->getValue() );
98
-
99
-		$this->assertEquals( $context->getEditor(), $itemUpd->getEditor() );
100
-		$this->assertEquals( $itemExp->getTimeCreated(), $itemUpd->getTimeCreated() );
101
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified() );
102
-
103
-		$this->assertInstanceOf( '\Aimeos\MShop\Common\Item\Iface', $resultSaved );
104
-		$this->assertInstanceOf( '\Aimeos\MShop\Common\Item\Iface', $resultUpd );
105
-
106
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
107
-		$this->object->getItem( $itemSaved->getId() );
78
+		$this->assertTrue($item->getId() !== null);
79
+		$this->assertTrue($itemSaved->getType() !== null);
80
+		$this->assertEquals($item->getId(), $itemSaved->getId());
81
+		$this->assertEquals($item->getParentId(), $itemSaved->getParentId());
82
+		$this->assertEquals($item->getSiteId(), $itemSaved->getSiteId());
83
+		$this->assertEquals($item->getTypeId(), $itemSaved->getTypeId());
84
+		$this->assertEquals($item->getLanguageId(), $itemSaved->getLanguageId());
85
+		$this->assertEquals($item->getValue(), $itemSaved->getValue());
86
+
87
+		$this->assertEquals($context->getEditor(), $itemSaved->getEditor());
88
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated());
89
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified());
90
+
91
+		$this->assertTrue($itemUpd->getType() !== null);
92
+		$this->assertEquals($itemExp->getId(), $itemUpd->getId());
93
+		$this->assertEquals($itemExp->getParentId(), $itemUpd->getParentId());
94
+		$this->assertEquals($itemExp->getSiteId(), $itemUpd->getSiteId());
95
+		$this->assertEquals($itemExp->getTypeId(), $itemUpd->getTypeId());
96
+		$this->assertEquals($itemExp->getLanguageId(), $itemUpd->getLanguageId());
97
+		$this->assertEquals($itemExp->getValue(), $itemUpd->getValue());
98
+
99
+		$this->assertEquals($context->getEditor(), $itemUpd->getEditor());
100
+		$this->assertEquals($itemExp->getTimeCreated(), $itemUpd->getTimeCreated());
101
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified());
102
+
103
+		$this->assertInstanceOf('\Aimeos\MShop\Common\Item\Iface', $resultSaved);
104
+		$this->assertInstanceOf('\Aimeos\MShop\Common\Item\Iface', $resultUpd);
105
+
106
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
107
+		$this->object->getItem($itemSaved->getId());
108 108
 	}
109 109
 
110 110
 
@@ -112,19 +112,19 @@  discard block
 block discarded – undo
112 112
 	{
113 113
 		$search = $this->object->createSearch();
114 114
 		$conditions = array(
115
-			$search->compare( '~=', 'customer.property.value', '1'),
116
-			$search->compare( '==', 'customer.property.editor', $this->editor )
115
+			$search->compare('~=', 'customer.property.value', '1'),
116
+			$search->compare('==', 'customer.property.editor', $this->editor)
117 117
 		);
118
-		$search->setConditions( $search->combine( '&&', $conditions ) );
119
-		$results = $this->object->searchItems( $search );
118
+		$search->setConditions($search->combine('&&', $conditions));
119
+		$results = $this->object->searchItems($search);
120 120
 
121
-		if( ($expected = reset($results)) === false ) {
122
-			throw new \RuntimeException( sprintf( 'No customer property item found for value "%1$s".', '1' ) );
121
+		if (($expected = reset($results)) === false) {
122
+			throw new \RuntimeException(sprintf('No customer property item found for value "%1$s".', '1'));
123 123
 		}
124 124
 
125
-		$actual = $this->object->getItem( $expected->getId() );
126
-		$this->assertNotEquals( '', $actual->getTypeName() );
127
-		$this->assertEquals( $expected, $actual );
125
+		$actual = $this->object->getItem($expected->getId());
126
+		$this->assertNotEquals('', $actual->getTypeName());
127
+		$this->assertEquals($expected, $actual);
128 128
 	}
129 129
 
130 130
 
@@ -132,15 +132,15 @@  discard block
 block discarded – undo
132 132
 	{
133 133
 		$result = $this->object->getResourceType();
134 134
 
135
-		$this->assertContains( 'customer/property', $result );
136
-		$this->assertContains( 'customer/property/type', $result );
135
+		$this->assertContains('customer/property', $result);
136
+		$this->assertContains('customer/property/type', $result);
137 137
 	}
138 138
 
139 139
 
140 140
 	public function testGetSearchAttributes()
141 141
 	{
142
-		foreach( $this->object->getSearchAttributes() as $attribute ) {
143
-			$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute );
142
+		foreach ($this->object->getSearchAttributes() as $attribute) {
143
+			$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute);
144 144
 		}
145 145
 	}
146 146
 
@@ -151,51 +151,51 @@  discard block
 block discarded – undo
151 151
 		$search = $this->object->createSearch();
152 152
 
153 153
 		$expr = [];
154
-		$expr[] = $search->compare( '!=', 'customer.property.id', null );
155
-		$expr[] = $search->compare( '!=', 'customer.property.parentid', null );
156
-		$expr[] = $search->compare( '!=', 'customer.property.siteid', null );
157
-		$expr[] = $search->compare( '!=', 'customer.property.typeid', null );
158
-		$expr[] = $search->compare( '==', 'customer.property.languageid', null );
159
-		$expr[] = $search->compare( '==', 'customer.property.value', '1' );
160
-		$expr[] = $search->compare( '==', 'customer.property.editor', $this->editor );
161
-
162
-		$expr[] = $search->compare( '!=', 'customer.property.type.id', null );
163
-		$expr[] = $search->compare( '!=', 'customer.property.type.siteid', null );
164
-		$expr[] = $search->compare( '==', 'customer.property.type.domain', 'customer' );
165
-		$expr[] = $search->compare( '==', 'customer.property.type.code', 'newsletter' );
166
-		$expr[] = $search->compare( '>', 'customer.property.type.label', '' );
167
-		$expr[] = $search->compare( '==', 'customer.property.type.status', 1 );
168
-		$expr[] = $search->compare( '>=', 'customer.property.type.mtime', '1970-01-01 00:00:00' );
169
-		$expr[] = $search->compare( '>=', 'customer.property.type.ctime', '1970-01-01 00:00:00' );
170
-		$expr[] = $search->compare( '==', 'customer.property.type.editor', $this->editor );
171
-
172
-		$search->setConditions( $search->combine('&&', $expr) );
173
-		$results = $this->object->searchItems( $search, [], $total );
174
-		$this->assertEquals( 1, count( $results ) );
154
+		$expr[] = $search->compare('!=', 'customer.property.id', null);
155
+		$expr[] = $search->compare('!=', 'customer.property.parentid', null);
156
+		$expr[] = $search->compare('!=', 'customer.property.siteid', null);
157
+		$expr[] = $search->compare('!=', 'customer.property.typeid', null);
158
+		$expr[] = $search->compare('==', 'customer.property.languageid', null);
159
+		$expr[] = $search->compare('==', 'customer.property.value', '1');
160
+		$expr[] = $search->compare('==', 'customer.property.editor', $this->editor);
161
+
162
+		$expr[] = $search->compare('!=', 'customer.property.type.id', null);
163
+		$expr[] = $search->compare('!=', 'customer.property.type.siteid', null);
164
+		$expr[] = $search->compare('==', 'customer.property.type.domain', 'customer');
165
+		$expr[] = $search->compare('==', 'customer.property.type.code', 'newsletter');
166
+		$expr[] = $search->compare('>', 'customer.property.type.label', '');
167
+		$expr[] = $search->compare('==', 'customer.property.type.status', 1);
168
+		$expr[] = $search->compare('>=', 'customer.property.type.mtime', '1970-01-01 00:00:00');
169
+		$expr[] = $search->compare('>=', 'customer.property.type.ctime', '1970-01-01 00:00:00');
170
+		$expr[] = $search->compare('==', 'customer.property.type.editor', $this->editor);
171
+
172
+		$search->setConditions($search->combine('&&', $expr));
173
+		$results = $this->object->searchItems($search, [], $total);
174
+		$this->assertEquals(1, count($results));
175 175
 
176 176
 
177 177
 		$search = $this->object->createSearch();
178 178
 		$conditions = array(
179
-			$search->compare( '=~', 'customer.property.type.code', 'newsletter' ),
180
-			$search->compare( '==', 'customer.property.editor', $this->editor )
179
+			$search->compare('=~', 'customer.property.type.code', 'newsletter'),
180
+			$search->compare('==', 'customer.property.editor', $this->editor)
181 181
 		);
182
-		$search->setConditions( $search->combine( '&&', $conditions ) );
182
+		$search->setConditions($search->combine('&&', $conditions));
183 183
 		$search->setSlice(0, 1);
184
-		$items = $this->object->searchItems( $search, [], $total );
184
+		$items = $this->object->searchItems($search, [], $total);
185 185
 
186
-		$this->assertEquals( 1, count( $items ) );
187
-		$this->assertEquals( 1, $total );
186
+		$this->assertEquals(1, count($items));
187
+		$this->assertEquals(1, $total);
188 188
 
189
-		foreach($items as $itemId => $item) {
190
-			$this->assertEquals( $itemId, $item->getId() );
189
+		foreach ($items as $itemId => $item) {
190
+			$this->assertEquals($itemId, $item->getId());
191 191
 		}
192 192
 	}
193 193
 
194 194
 
195 195
 	public function testGetSubManager()
196 196
 	{
197
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') );
198
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') );
197
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type'));
198
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard'));
199 199
 
200 200
 		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
201 201
 		$this->object->getSubManager('unknown');
Please login to merge, or discard this patch.
lib/custom/setup/unittest/CustomerAddLaravelTestData.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function getPreDependencies()
23 23
 	{
24
-		return array( 'TablesAddLaravelTestData' );
24
+		return array('TablesAddLaravelTestData');
25 25
 	}
26 26
 
27 27
 
@@ -30,34 +30,34 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public function migrate()
32 32
 	{
33
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\MShop\\Context\\Item\\Iface', $this->additional );
33
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\MShop\\Context\\Item\\Iface', $this->additional);
34 34
 
35
-		$this->msg( 'Adding Laravel customer test data', 0 );
36
-		$this->additional->setEditor( 'ai-laravel:unittest' );
35
+		$this->msg('Adding Laravel customer test data', 0);
36
+		$this->additional->setEditor('ai-laravel:unittest');
37 37
 
38 38
 		$parentIds = [];
39 39
 		$ds = DIRECTORY_SEPARATOR;
40
-		$path = __DIR__ . $ds . 'data' . $ds . 'customer.php';
40
+		$path = __DIR__.$ds.'data'.$ds.'customer.php';
41 41
 
42
-		if( ( $testdata = include( $path ) ) == false ){
43
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
42
+		if (($testdata = include($path)) == false) {
43
+			throw new \Aimeos\MShop\Exception(sprintf('No file "%1$s" found for customer domain', $path));
44 44
 		}
45 45
 
46 46
 
47
-		$customerManager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $this->additional, 'Laravel' );
48
-		$customerAddressManager = $customerManager->getSubManager( 'address', 'Laravel' );
47
+		$customerManager = \Aimeos\MShop\Customer\Manager\Factory::createManager($this->additional, 'Laravel');
48
+		$customerAddressManager = $customerManager->getSubManager('address', 'Laravel');
49 49
 
50
-		$this->cleanupCustomerData( $customerManager, $customerAddressManager );
50
+		$this->cleanupCustomerData($customerManager, $customerAddressManager);
51 51
 
52 52
 		$this->conn->begin();
53 53
 
54
-		$parentIds = $this->addCustomerData( $testdata, $customerManager, $customerAddressManager->createItem() );
55
-		$this->addCustomerAddressData( $testdata, $customerAddressManager, $parentIds );
54
+		$parentIds = $this->addCustomerData($testdata, $customerManager, $customerAddressManager->createItem());
55
+		$this->addCustomerAddressData($testdata, $customerAddressManager, $parentIds);
56 56
 
57 57
 		$this->conn->commit();
58 58
 
59 59
 
60
-		$this->status( 'done' );
60
+		$this->status('done');
61 61
 	}
62 62
 
63 63
 
@@ -67,17 +67,17 @@  discard block
 block discarded – undo
67 67
 	 * @param \Aimeos\MShop\Common\Manager\Iface $customerManager Customer manager
68 68
 	 * @param \Aimeos\MShop\Common\Manager\Iface $customerAddressManager Customer address manager
69 69
 	 */
70
-	protected function cleanupCustomerData( \Aimeos\MShop\Common\Manager\Iface $customerManager, \Aimeos\MShop\Common\Manager\Iface $customerAddressManager )
70
+	protected function cleanupCustomerData(\Aimeos\MShop\Common\Manager\Iface $customerManager, \Aimeos\MShop\Common\Manager\Iface $customerAddressManager)
71 71
 	{
72 72
 		$search = $customerManager->createSearch();
73
-		$search->setConditions( $search->compare( '=~', 'customer.code', 'UTC00' ) );
74
-		$customerItems = $customerManager->searchItems( $search );
73
+		$search->setConditions($search->compare('=~', 'customer.code', 'UTC00'));
74
+		$customerItems = $customerManager->searchItems($search);
75 75
 
76 76
 		$search = $customerAddressManager->createSearch();
77
-		$search->setConditions( $search->compare( '=~', 'customer.address.email', 'unitCustomer' ) );
78
-		$addressItems = $customerAddressManager->searchItems( $search );
77
+		$search->setConditions($search->compare('=~', 'customer.address.email', 'unitCustomer'));
78
+		$addressItems = $customerAddressManager->searchItems($search);
79 79
 
80
-		$customerAddressManager->deleteItems( array_keys( $addressItems ) );
81
-		$customerManager->deleteItems( array_keys( $customerItems ) );
80
+		$customerAddressManager->deleteItems(array_keys($addressItems));
81
+		$customerManager->deleteItems(array_keys($customerItems));
82 82
 	}
83 83
 }
Please login to merge, or discard this patch.
lib/custom/setup/unittest/CustomerListAddLaravelTestData.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function getPreDependencies()
24 24
 	{
25
-		return array( 'TablesCreateLaravel', 'CustomerAddLaravelTestData', 'LocaleAddTestData', 'TextAddTestData' );
25
+		return array('TablesCreateLaravel', 'CustomerAddLaravelTestData', 'LocaleAddTestData', 'TextAddTestData');
26 26
 	}
27 27
 
28 28
 
@@ -31,27 +31,27 @@  discard block
 block discarded – undo
31 31
 	 */
32 32
 	public function migrate()
33 33
 	{
34
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\MShop\\Context\\Item\\Iface', $this->additional );
34
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\MShop\\Context\\Item\\Iface', $this->additional);
35 35
 
36
-		$this->msg( 'Adding customer-list Laravel test data', 0 );
37
-		$this->additional->setEditor( 'ai-laravel:unittest' );
36
+		$this->msg('Adding customer-list Laravel test data', 0);
37
+		$this->additional->setEditor('ai-laravel:unittest');
38 38
 
39 39
 		$ds = DIRECTORY_SEPARATOR;
40
-		$path = __DIR__ . $ds . 'data' . $ds . 'customer-list.php';
40
+		$path = __DIR__.$ds.'data'.$ds.'customer-list.php';
41 41
 
42
-		if( ( $testdata = include( $path ) ) == false ){
43
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer list domain', $path ) );
42
+		if (($testdata = include($path)) == false) {
43
+			throw new \Aimeos\MShop\Exception(sprintf('No file "%1$s" found for customer list domain', $path));
44 44
 		}
45 45
 
46 46
 		$refKeys = [];
47
-		foreach( $testdata['customer/lists'] as $dataset ) {
48
-			$refKeys[ $dataset['domain'] ][] = $dataset['refid'];
47
+		foreach ($testdata['customer/lists'] as $dataset) {
48
+			$refKeys[$dataset['domain']][] = $dataset['refid'];
49 49
 		}
50 50
 
51 51
 		$refIds = [];
52
-		$refIds['text'] = $this->getTextData( $refKeys['text'] );
53
-		$this->addCustomerListData( $testdata, $refIds, 'Laravel' );
52
+		$refIds['text'] = $this->getTextData($refKeys['text']);
53
+		$this->addCustomerListData($testdata, $refIds, 'Laravel');
54 54
 
55
-		$this->status( 'done' );
55
+		$this->status('done');
56 56
 	}
57 57
 }
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
lib/custom/setup/unittest/CustomerPropertyAddLaravelTestData.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	public function getPreDependencies()
25 25
 	{
26
-		return array( 'TablesCreateLaravel', 'CustomerAddLaravelTestData', 'LocaleAddTestData' );
26
+		return array('TablesCreateLaravel', 'CustomerAddLaravelTestData', 'LocaleAddTestData');
27 27
 	}
28 28
 
29 29
 
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
 	public function migrate()
34 34
 	{
35
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\MShop\\Context\\Item\\Iface', $this->additional );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\MShop\\Context\\Item\\Iface', $this->additional);
36 36
 
37
-		$this->msg( 'Adding customer-property Laravel test data', 0 );
38
-		$this->additional->setEditor( 'ai-laravel:unittest' );
37
+		$this->msg('Adding customer-property Laravel test data', 0);
38
+		$this->additional->setEditor('ai-laravel:unittest');
39 39
 
40 40
 		$ds = DIRECTORY_SEPARATOR;
41
-		$path = __DIR__ . $ds . 'data' . $ds . 'customer-property.php';
41
+		$path = __DIR__.$ds.'data'.$ds.'customer-property.php';
42 42
 
43
-		if( ( $testdata = include( $path ) ) == false ) {
44
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
43
+		if (($testdata = include($path)) == false) {
44
+			throw new \Aimeos\MShop\Exception(sprintf('No file "%1$s" found for customer domain', $path));
45 45
 		}
46 46
 
47
-		$this->addCustomerPropertyData( $testdata, 'Laravel' );
47
+		$this->addCustomerPropertyData($testdata, 'Laravel');
48 48
 
49
-		$this->status( 'done' );
49
+		$this->status('done');
50 50
 	}
51 51
 }
52 52
\ No newline at end of file
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Property/Laravel.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		'customer.property.id' => array(
25 25
 			'code' => 'customer.property.id',
26 26
 			'internalcode' => 'lvupr."id"',
27
-			'internaldeps'=>array( 'LEFT JOIN "users_property" AS lvupr ON ( lvupr."parentid" = lvu."id" )' ),
27
+			'internaldeps'=>array('LEFT JOIN "users_property" AS lvupr ON ( lvupr."parentid" = lvu."id" )'),
28 28
 			'label' => 'Property ID',
29 29
 			'type' => 'integer',
30 30
 			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 	 *
101 101
 	 * @param integer[] $siteids List of IDs for sites whose entries should be deleted
102 102
 	 */
103
-	public function cleanup( array $siteids )
103
+	public function cleanup(array $siteids)
104 104
 	{
105 105
 		$path = 'mshop/customer/manager/property/submanagers';
106
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
107
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
106
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
107
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
108 108
 		}
109 109
 
110
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/property/laravel/delete' );
110
+		$this->cleanupBase($siteids, 'mshop/customer/manager/property/laravel/delete');
111 111
 	}
112 112
 
113 113
 
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
 	 * @param boolean $withsub Return also attributes of sub-managers if true
118 118
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
119 119
 	 */
120
-	public function getSearchAttributes( $withsub = true )
120
+	public function getSearchAttributes($withsub = true)
121 121
 	{
122 122
 		$path = 'mshop/customer/manager/property/submanagers';
123 123
 
124
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, ['type'], $withsub );
124
+		return $this->getSearchAttributesBase($this->searchConfig, $path, ['type'], $withsub);
125 125
 	}
126 126
 
127 127
 
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 	 * configuration (or Default) if null
134 134
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g property types, property lists etc.
135 135
 	 */
136
-	public function getSubManager( $manager, $name = null )
136
+	public function getSubManager($manager, $name = null)
137 137
 	{
138
-		return $this->getSubManagerBase( 'customer', 'property/' . $manager, ( $name === null ? 'Laravel' : $name ) );
138
+		return $this->getSubManagerBase('customer', 'property/'.$manager, ($name === null ? 'Laravel' : $name));
139 139
 	}
140 140
 
141 141
 
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer-list.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2014-2018
6 6
  */
7 7
 
8
-return array (
9
-	'customer/lists/type' => array (
10
-		'customer/group/default' => array( 'domain' => 'customer/group', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
11
-		'order/download' => array( 'domain' => 'order', 'code' => 'download', 'label' => 'Download', 'status' => 1 ),
12
-		'product/favorite' => array( 'domain' => 'product', 'code' => 'favorite', 'label' => 'Favorite', 'status' => 1 ),
13
-		'product/watch' => array( 'domain' => 'product', 'code' => 'watch', 'label' => 'Watch list', 'status' => 1 ),
14
-		'text/default' => array( 'domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
8
+return array(
9
+	'customer/lists/type' => array(
10
+		'customer/group/default' => array('domain' => 'customer/group', 'code' => 'default', 'label' => 'Standard', 'status' => 1),
11
+		'order/download' => array('domain' => 'order', 'code' => 'download', 'label' => 'Download', 'status' => 1),
12
+		'product/favorite' => array('domain' => 'product', 'code' => 'favorite', 'label' => 'Favorite', 'status' => 1),
13
+		'product/watch' => array('domain' => 'product', 'code' => 'watch', 'label' => 'Watch list', 'status' => 1),
14
+		'text/default' => array('domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1),
15 15
 	),
16 16
 
17
-	'customer/lists' => array (
18
-		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 1, 'status' => 1 ),
19
-		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/notify', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 2, 'status' => 1 ),
20
-		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/newsletter', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 3, 'status' => 1 ),
21
-		array( 'parentid' => 'customer/UTC001', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 1, 'status' => 1 ),
17
+	'customer/lists' => array(
18
+		array('parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 1, 'status' => 1),
19
+		array('parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/notify', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 2, 'status' => 1),
20
+		array('parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/newsletter', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 3, 'status' => 1),
21
+		array('parentid' => 'customer/UTC001', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => [], 'pos' => 1, 'status' => 1),
22 22
 	),
23 23
 );
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,17 +5,17 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2014-2018
6 6
  */
7 7
 
8
-return array (
8
+return array(
9 9
 	'customer' => array(
10
-		'customer/UTC001' => array( 'code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'longitude' => '10.0', 'latitude' => '50.0', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
11
-		'customer/UTC002' => array( 'code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'longitude' => '10.5', 'latitude' => '51.0', 'birthday' => '1970-01-01', 'status' => '0','password' =>  'test' ),
12
-		'customer/UTC003' => array( 'code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'longitude' => '11.0', 'latitude' => '52.0', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
10
+		'customer/UTC001' => array('code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'longitude' => '10.0', 'latitude' => '50.0', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test'),
11
+		'customer/UTC002' => array('code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'longitude' => '10.5', 'latitude' => '51.0', 'birthday' => '1970-01-01', 'status' => '0', 'password' =>  'test'),
12
+		'customer/UTC003' => array('code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'longitude' => '11.0', 'latitude' => '52.0', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test'),
13 13
 	),
14 14
 
15 15
 	'customer/address' => array(
16
-		array( 'parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'longitude' => '10.0', 'latitude' => '50.0', 'flag' => 0, 'pos' => '0' ),
17
-		array( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'longitude' => '10.5', 'latitude' => '51.0', 'flag' => 0, 'pos' => '1' ),
18
-		array( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'longitude' => '11.0', 'latitude' => '52.0', 'flag' => 0, 'pos' => '1' ),
19
-		array( 'parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'longitude' => '10.0', 'latitude' => '50.0', 'flag' => 0, 'pos' => '2' ),
16
+		array('parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'longitude' => '10.0', 'latitude' => '50.0', 'flag' => 0, 'pos' => '0'),
17
+		array('parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'longitude' => '10.5', 'latitude' => '51.0', 'flag' => 0, 'pos' => '1'),
18
+		array('parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'longitude' => '11.0', 'latitude' => '52.0', 'flag' => 0, 'pos' => '1'),
19
+		array('parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'longitude' => '10.0', 'latitude' => '50.0', 'flag' => 0, 'pos' => '2'),
20 20
 	),
21 21
 );
Please login to merge, or discard this patch.