Completed
Push — master ( 8c23c8...3a0c6f )
by Aimeos
02:00
created
lib/custom/tests/MW/View/Engine/BladeTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -16,41 +16,41 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		if( !class_exists( '\Illuminate\View\Factory' ) ) {
20
-			$this->markTestSkipped( '\Illuminate\View\Factory is not available' );
19
+		if (!class_exists('\Illuminate\View\Factory')) {
20
+			$this->markTestSkipped('\Illuminate\View\Factory is not available');
21 21
 		}
22 22
 
23
-		$this->mock = $this->getMockBuilder( \Illuminate\View\Factory::class )
24
-			->setMethods( array( 'file' ) )
23
+		$this->mock = $this->getMockBuilder(\Illuminate\View\Factory::class)
24
+			->setMethods(array('file'))
25 25
 			->disableOriginalConstructor()
26 26
 			->getMock();
27 27
 
28
-		$this->object = new \Aimeos\MW\View\Engine\Blade( $this->mock );
28
+		$this->object = new \Aimeos\MW\View\Engine\Blade($this->mock);
29 29
 	}
30 30
 
31 31
 
32 32
 	protected function tearDown()
33 33
 	{
34
-		unset( $this->object, $this->mock );
34
+		unset($this->object, $this->mock);
35 35
 	}
36 36
 
37 37
 
38 38
 	public function testRender()
39 39
 	{
40
-		$v = new \Aimeos\MW\View\Standard( [] );
40
+		$v = new \Aimeos\MW\View\Standard([]);
41 41
 
42
-		$view = $this->getMockBuilder( \Illuminate\View\View::class )
43
-			->setMethods( array( 'render' ) )
42
+		$view = $this->getMockBuilder(\Illuminate\View\View::class)
43
+			->setMethods(array('render'))
44 44
 			->disableOriginalConstructor()
45 45
 			->getMock();
46 46
 
47
-		$view->expects( $this->once() )->method( 'render' )
48
-			->will( $this->returnValue( 'test' ) );
47
+		$view->expects($this->once())->method('render')
48
+			->will($this->returnValue('test'));
49 49
 
50
-		$this->mock->expects( $this->once() )->method( 'file' )
51
-			->will( $this->returnValue( $view) );
50
+		$this->mock->expects($this->once())->method('file')
51
+			->will($this->returnValue($view));
52 52
 
53
-		$result = $this->object->render( $v, 'filepath', array( 'key' => 'value' ) );
54
-		$this->assertEquals( 'test', $result );
53
+		$result = $this->object->render($v, 'filepath', array('key' => 'value'));
54
+		$this->assertEquals('test', $result);
55 55
 	}
56 56
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/Manager/LaravelTest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -18,50 +18,50 @@
 block discarded – undo
18 18
 
19 19
 	protected function setUp()
20 20
 	{
21
-		if( !class_exists( '\Illuminate\Filesystem\FilesystemManager' ) ) {
22
-			$this->markTestSkipped( 'Install the Laravel framework first' );
21
+		if (!class_exists('\Illuminate\Filesystem\FilesystemManager')) {
22
+			$this->markTestSkipped('Install the Laravel framework first');
23 23
 		}
24 24
 
25
-		$this->storage = $this->getMockBuilder( \Illuminate\Filesystem\FilesystemManager::class )
26
-			->setMethods( array( 'get' ) )
25
+		$this->storage = $this->getMockBuilder(\Illuminate\Filesystem\FilesystemManager::class)
26
+			->setMethods(array('get'))
27 27
 			->disableOriginalConstructor()
28 28
 			->getMock();
29 29
 
30
-		$this->config = new \Aimeos\MW\Config\Decorator\Memory( new \Aimeos\MW\Config\PHPArray( [], [] ) );
31
-		$this->object = new \Aimeos\MW\Filesystem\Manager\Laravel( $this->storage, $this->config, sys_get_temp_dir() );
30
+		$this->config = new \Aimeos\MW\Config\Decorator\Memory(new \Aimeos\MW\Config\PHPArray([], []));
31
+		$this->object = new \Aimeos\MW\Filesystem\Manager\Laravel($this->storage, $this->config, sys_get_temp_dir());
32 32
 	}
33 33
 
34 34
 
35 35
 	protected function tearDown()
36 36
 	{
37
-		unset( $this->config, $this->object, $this->storage );
37
+		unset($this->config, $this->object, $this->storage);
38 38
 	}
39 39
 
40 40
 
41 41
 	public function testGet()
42 42
 	{
43
-		$fs = $this->getMockBuilder( 'Illuminate\Contracts\Filesystem\Filesystem' )
43
+		$fs = $this->getMockBuilder('Illuminate\Contracts\Filesystem\Filesystem')
44 44
 			->disableOriginalConstructor()
45 45
 			->getMock();
46 46
 
47
-		$this->storage->expects( $this->once() )->method( 'get' )
48
-			->will( $this->returnValue( $fs ) );
47
+		$this->storage->expects($this->once())->method('get')
48
+			->will($this->returnValue($fs));
49 49
 
50
-		$this->config->set( 'resource/fs-media', 'local' );
51
-		$this->assertInstanceof( 'Aimeos\MW\Filesystem\Iface', $this->object->get( 'fs-media' ) );
50
+		$this->config->set('resource/fs-media', 'local');
51
+		$this->assertInstanceof('Aimeos\MW\Filesystem\Iface', $this->object->get('fs-media'));
52 52
 	}
53 53
 
54 54
 
55 55
 	public function testGetFallback()
56 56
 	{
57
-		$this->config->set( 'resource/fs', array( 'adapter' => 'Standard', 'basedir' => __DIR__ ) );
58
-		$this->assertInstanceof( 'Aimeos\MW\Filesystem\Iface', $this->object->get( 'fs-media' ) );
57
+		$this->config->set('resource/fs', array('adapter' => 'Standard', 'basedir' => __DIR__));
58
+		$this->assertInstanceof('Aimeos\MW\Filesystem\Iface', $this->object->get('fs-media'));
59 59
 	}
60 60
 
61 61
 
62 62
 	public function testGetException()
63 63
 	{
64
-		$this->setExpectedException( 'Aimeos\MW\Filesystem\Exception' );
65
-		$this->object->get( 'fs-media' );
64
+		$this->setExpectedException('Aimeos\MW\Filesystem\Exception');
65
+		$this->object->get('fs-media');
66 66
 	}
67 67
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/LaravelTest.php 1 patch
Spacing   +124 added lines, -124 removed lines patch added patch discarded remove patch
@@ -17,348 +17,348 @@
 block discarded – undo
17 17
 
18 18
 	protected function setUp()
19 19
 	{
20
-		if( !interface_exists( '\\Illuminate\\Contracts\\Filesystem\\Filesystem' ) ) {
21
-			$this->markTestSkipped( 'Install Laravel framework first' );
20
+		if (!interface_exists('\\Illuminate\\Contracts\\Filesystem\\Filesystem')) {
21
+			$this->markTestSkipped('Install Laravel framework first');
22 22
 		}
23 23
 
24
-		$this->mock = $this->getMockBuilder( '\\Illuminate\\Contracts\\Filesystem\\Filesystem' )
24
+		$this->mock = $this->getMockBuilder('\\Illuminate\\Contracts\\Filesystem\\Filesystem')
25 25
 			->disableOriginalConstructor()
26 26
 			->getMock();
27 27
 
28
-		$this->object = new \Aimeos\MW\Filesystem\Laravel( $this->mock, sys_get_temp_dir() );
28
+		$this->object = new \Aimeos\MW\Filesystem\Laravel($this->mock, sys_get_temp_dir());
29 29
 	}
30 30
 
31 31
 
32 32
 	protected function tearDown()
33 33
 	{
34
-		unset( $this->object );
34
+		unset($this->object);
35 35
 	}
36 36
 
37 37
 
38 38
 	public function testIsdir()
39 39
 	{
40
-		$this->mock->expects( $this->once() )->method( 'directories' )
41
-			->will( $this->returnValue( array( 't', 'test', 'es' ) ) );
40
+		$this->mock->expects($this->once())->method('directories')
41
+			->will($this->returnValue(array('t', 'test', 'es')));
42 42
 
43
-		$this->assertTrue( $this->object->isdir( 'test' ) );
43
+		$this->assertTrue($this->object->isdir('test'));
44 44
 	}
45 45
 
46 46
 
47 47
 	public function testIsdirFalse()
48 48
 	{
49
-		$this->mock->expects( $this->once() )->method( 'directories' )
50
-			->will( $this->returnValue( array( 't', 'es' ) ) );
49
+		$this->mock->expects($this->once())->method('directories')
50
+			->will($this->returnValue(array('t', 'es')));
51 51
 
52
-		$this->assertFalse( $this->object->isdir( 'test' ) );
52
+		$this->assertFalse($this->object->isdir('test'));
53 53
 	}
54 54
 
55 55
 
56 56
 	public function testMkdir()
57 57
 	{
58
-		$this->mock->expects( $this->once() )->method( 'makeDirectory' );
58
+		$this->mock->expects($this->once())->method('makeDirectory');
59 59
 
60
-		$this->object->mkdir( 'test' );
60
+		$this->object->mkdir('test');
61 61
 	}
62 62
 
63 63
 
64 64
 	public function testMkdirException()
65 65
 	{
66
-		$this->mock->expects( $this->once() )->method( 'makeDirectory' )
67
-			->will( $this->throwException( new \RuntimeException() ) );
66
+		$this->mock->expects($this->once())->method('makeDirectory')
67
+			->will($this->throwException(new \RuntimeException()));
68 68
 
69
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
70
-		$this->object->mkdir( 'test' );
69
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
70
+		$this->object->mkdir('test');
71 71
 	}
72 72
 
73 73
 
74 74
 	public function testRmdir()
75 75
 	{
76
-		$this->mock->expects( $this->once() )->method( 'deleteDirectory' );
76
+		$this->mock->expects($this->once())->method('deleteDirectory');
77 77
 
78
-		$this->object->rmdir( 'test' );
78
+		$this->object->rmdir('test');
79 79
 	}
80 80
 
81 81
 
82 82
 	public function testRmdirException()
83 83
 	{
84
-		$this->mock->expects( $this->once() )->method( 'deleteDirectory' )
85
-			->will( $this->throwException( new \RuntimeException() ) );
84
+		$this->mock->expects($this->once())->method('deleteDirectory')
85
+			->will($this->throwException(new \RuntimeException()));
86 86
 
87
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
88
-		$this->object->rmdir( 'test' );
87
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
88
+		$this->object->rmdir('test');
89 89
 	}
90 90
 
91 91
 
92 92
 	public function testScan()
93 93
 	{
94
-		$list = array( 't', 'es', 'st' );
94
+		$list = array('t', 'es', 'st');
95 95
 
96
-		$this->mock->expects( $this->once() )->method( 'directories' )
97
-			->will( $this->returnValue( array( 't', 'es' ) ) );
96
+		$this->mock->expects($this->once())->method('directories')
97
+			->will($this->returnValue(array('t', 'es')));
98 98
 
99
-		$this->mock->expects( $this->once() )->method( 'files' )
100
-			->will( $this->returnValue( array( 'st' ) ) );
99
+		$this->mock->expects($this->once())->method('files')
100
+			->will($this->returnValue(array('st')));
101 101
 
102 102
 		$result = $this->object->scan();
103 103
 
104
-		$this->assertInternalType( 'array', $result );
104
+		$this->assertInternalType('array', $result);
105 105
 
106
-		foreach( $result as $entry ) {
107
-			$this->assertTrue( in_array( $entry, $list ) );
106
+		foreach ($result as $entry) {
107
+			$this->assertTrue(in_array($entry, $list));
108 108
 		}
109 109
 	}
110 110
 
111 111
 
112 112
 	public function testScanException()
113 113
 	{
114
-		$this->mock->expects( $this->once() )->method( 'directories' )
115
-			->will( $this->throwException( new \RuntimeException() ) );
114
+		$this->mock->expects($this->once())->method('directories')
115
+			->will($this->throwException(new \RuntimeException()));
116 116
 
117
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
118
-		$this->object->scan( 'test' );
117
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
118
+		$this->object->scan('test');
119 119
 	}
120 120
 
121 121
 
122 122
 	public function testSize()
123 123
 	{
124
-		$this->mock->expects( $this->once() )->method( 'size' )
125
-			->will( $this->returnValue( 4 ) );
124
+		$this->mock->expects($this->once())->method('size')
125
+			->will($this->returnValue(4));
126 126
 
127
-		$result = $this->object->size( 'test' );
127
+		$result = $this->object->size('test');
128 128
 
129
-		$this->assertEquals( 4, $result );
129
+		$this->assertEquals(4, $result);
130 130
 	}
131 131
 
132 132
 
133 133
 	public function testSizeException()
134 134
 	{
135
-		$this->mock->expects( $this->once() )->method( 'size' )
136
-			->will( $this->throwException( new \RuntimeException() ) );
135
+		$this->mock->expects($this->once())->method('size')
136
+			->will($this->throwException(new \RuntimeException()));
137 137
 
138
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
139
-		$this->object->size( 'test' );
138
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
139
+		$this->object->size('test');
140 140
 	}
141 141
 
142 142
 
143 143
 	public function testTime()
144 144
 	{
145
-		$this->mock->expects( $this->once() )->method( 'lastModified' )
146
-			->will( $this->returnValue( 1 ) );
145
+		$this->mock->expects($this->once())->method('lastModified')
146
+			->will($this->returnValue(1));
147 147
 
148
-		$result = $this->object->time( 'test' );
148
+		$result = $this->object->time('test');
149 149
 
150
-		$this->assertGreaterThan( 0, $result );
150
+		$this->assertGreaterThan(0, $result);
151 151
 	}
152 152
 
153 153
 
154 154
 	public function testTimeException()
155 155
 	{
156
-		$this->mock->expects( $this->once() )->method( 'lastModified' )
157
-			->will( $this->throwException( new \RuntimeException() ) );
156
+		$this->mock->expects($this->once())->method('lastModified')
157
+			->will($this->throwException(new \RuntimeException()));
158 158
 
159
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
160
-		$this->object->time( 'test' );
159
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
160
+		$this->object->time('test');
161 161
 	}
162 162
 
163 163
 
164 164
 	public function testRm()
165 165
 	{
166
-		$this->mock->expects( $this->once() )->method( 'delete' );
166
+		$this->mock->expects($this->once())->method('delete');
167 167
 
168
-		$this->object->rm( 'test' );
168
+		$this->object->rm('test');
169 169
 	}
170 170
 
171 171
 
172 172
 	public function testRmException()
173 173
 	{
174
-		$this->mock->expects( $this->once() )->method( 'delete' )
175
-			->will( $this->throwException( new \RuntimeException() ) );
174
+		$this->mock->expects($this->once())->method('delete')
175
+			->will($this->throwException(new \RuntimeException()));
176 176
 
177
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
178
-		$this->object->rm( 'test' );
177
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
178
+		$this->object->rm('test');
179 179
 	}
180 180
 
181 181
 
182 182
 	public function testHas()
183 183
 	{
184
-		$this->mock->expects( $this->once() )->method( 'exists' )
185
-			->will( $this->returnValue( true ) );
184
+		$this->mock->expects($this->once())->method('exists')
185
+			->will($this->returnValue(true));
186 186
 
187
-		$result = $this->object->has( 'test' );
187
+		$result = $this->object->has('test');
188 188
 
189
-		$this->assertTrue( $result );
189
+		$this->assertTrue($result);
190 190
 	}
191 191
 
192 192
 
193 193
 	public function testHasFalse()
194 194
 	{
195
-		$this->mock->expects( $this->once() )->method( 'exists' )
196
-			->will( $this->returnValue( false ) );
195
+		$this->mock->expects($this->once())->method('exists')
196
+			->will($this->returnValue(false));
197 197
 
198
-		$result = $this->object->has( 'test' );
198
+		$result = $this->object->has('test');
199 199
 
200
-		$this->assertFalse( $result );
200
+		$this->assertFalse($result);
201 201
 	}
202 202
 
203 203
 
204 204
 	public function testRead()
205 205
 	{
206
-		$this->mock->expects( $this->once() )->method( 'get' )
207
-			->will( $this->returnValue( 'test' ) );
206
+		$this->mock->expects($this->once())->method('get')
207
+			->will($this->returnValue('test'));
208 208
 
209
-		$result = $this->object->read( 'file' );
209
+		$result = $this->object->read('file');
210 210
 
211
-		$this->assertEquals( 'test', $result );
211
+		$this->assertEquals('test', $result);
212 212
 	}
213 213
 
214 214
 
215 215
 	public function testReadException()
216 216
 	{
217
-		$this->mock->expects( $this->once() )->method( 'get' )
218
-			->will( $this->throwException( new \RuntimeException() ) );
217
+		$this->mock->expects($this->once())->method('get')
218
+			->will($this->throwException(new \RuntimeException()));
219 219
 
220
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
221
-		$this->object->read( 'readinvalid' );
220
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
221
+		$this->object->read('readinvalid');
222 222
 	}
223 223
 
224 224
 
225 225
 	public function testReadf()
226 226
 	{
227
-		$this->mock->expects( $this->once() )->method( 'get' )
228
-			->will( $this->returnValue( 'test' ) );
227
+		$this->mock->expects($this->once())->method('get')
228
+			->will($this->returnValue('test'));
229 229
 
230
-		$result = $this->object->readf( 'file' );
230
+		$result = $this->object->readf('file');
231 231
 
232
-		$this->assertEquals( 'test', file_get_contents( $result ) );
233
-		unlink( $result );
232
+		$this->assertEquals('test', file_get_contents($result));
233
+		unlink($result);
234 234
 	}
235 235
 
236 236
 
237 237
 	public function testReads()
238 238
 	{
239
-		$this->mock->expects( $this->once() )->method( 'get' )
240
-			->will( $this->returnValue( 'test' ) );
239
+		$this->mock->expects($this->once())->method('get')
240
+			->will($this->returnValue('test'));
241 241
 
242
-		$handle = $this->object->reads( 'file' );
242
+		$handle = $this->object->reads('file');
243 243
 
244
-		$this->assertInternalType( 'resource', $handle );
245
-		$this->assertEquals( 'test', fgets( $handle ) );
244
+		$this->assertInternalType('resource', $handle);
245
+		$this->assertEquals('test', fgets($handle));
246 246
 
247
-		fclose( $handle );
247
+		fclose($handle);
248 248
 	}
249 249
 
250 250
 
251 251
 	public function testReadsException()
252 252
 	{
253
-		$this->mock->expects( $this->once() )->method( 'get' )
254
-			->will( $this->throwException( new \RuntimeException() ) );
253
+		$this->mock->expects($this->once())->method('get')
254
+			->will($this->throwException(new \RuntimeException()));
255 255
 
256
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
257
-		$this->object->reads( 'readinvalid' );
256
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
257
+		$this->object->reads('readinvalid');
258 258
 	}
259 259
 
260 260
 
261 261
 	public function testWrite()
262 262
 	{
263
-		$this->mock->expects( $this->once() )->method( 'put' );
263
+		$this->mock->expects($this->once())->method('put');
264 264
 
265
-		$this->object->write( 'file', 'test' );
265
+		$this->object->write('file', 'test');
266 266
 	}
267 267
 
268 268
 
269 269
 	public function testWriteException()
270 270
 	{
271
-		$this->mock->expects( $this->once() )->method( 'put' )
272
-			->will( $this->throwException( new \RuntimeException() ) );
271
+		$this->mock->expects($this->once())->method('put')
272
+			->will($this->throwException(new \RuntimeException()));
273 273
 
274
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
275
-		$this->object->write( '', 'test' );
274
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
275
+		$this->object->write('', 'test');
276 276
 	}
277 277
 
278 278
 
279 279
 	public function testWritef()
280 280
 	{
281
-		$file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'file99';
282
-		file_put_contents( $file, 'test' );
281
+		$file = sys_get_temp_dir().DIRECTORY_SEPARATOR.'file99';
282
+		file_put_contents($file, 'test');
283 283
 
284
-		$this->mock->expects( $this->once() )->method( 'put' );
284
+		$this->mock->expects($this->once())->method('put');
285 285
 
286
-		$this->object->writef( 'file', $file );
286
+		$this->object->writef('file', $file);
287 287
 
288
-		unlink( $file );
288
+		unlink($file);
289 289
 	}
290 290
 
291 291
 
292 292
 	public function testWritefException()
293 293
 	{
294
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
295
-		$this->object->writef( '', 'invalid' );
294
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
295
+		$this->object->writef('', 'invalid');
296 296
 	}
297 297
 
298 298
 
299 299
 	public function testWrites()
300 300
 	{
301
-		$this->mock->expects( $this->once() )->method( 'put' );
301
+		$this->mock->expects($this->once())->method('put');
302 302
 
303
-		$handle = fopen( __FILE__, 'r' );
303
+		$handle = fopen(__FILE__, 'r');
304 304
 
305
-		$this->object->writes( 'file', $handle );
305
+		$this->object->writes('file', $handle);
306 306
 
307
-		fclose( $handle );
307
+		fclose($handle);
308 308
 	}
309 309
 
310 310
 
311 311
 	public function testWritesException()
312 312
 	{
313
-		$this->mock->expects( $this->once() )->method( 'put' )
314
-			->will( $this->throwException( new \RuntimeException() ) );
313
+		$this->mock->expects($this->once())->method('put')
314
+			->will($this->throwException(new \RuntimeException()));
315 315
 
316
-		$handle = fopen( __FILE__, 'r' );
316
+		$handle = fopen(__FILE__, 'r');
317 317
 
318
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
319
-		$this->object->writes( 'file', $handle );
318
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
319
+		$this->object->writes('file', $handle);
320 320
 	}
321 321
 
322 322
 
323 323
 	public function testWritesException2()
324 324
 	{
325
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
326
-		$this->object->writes( 'file', null );
325
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
326
+		$this->object->writes('file', null);
327 327
 	}
328 328
 
329 329
 
330 330
 	public function testMove()
331 331
 	{
332
-		$this->mock->expects( $this->once() )->method( 'move' );
332
+		$this->mock->expects($this->once())->method('move');
333 333
 
334
-		$this->object->move( 'file1', 'file2' );
334
+		$this->object->move('file1', 'file2');
335 335
 	}
336 336
 
337 337
 
338 338
 	public function testMoveException()
339 339
 	{
340
-		$this->mock->expects( $this->once() )->method( 'move' )
341
-			->will( $this->throwException( new \RuntimeException() ) );
340
+		$this->mock->expects($this->once())->method('move')
341
+			->will($this->throwException(new \RuntimeException()));
342 342
 
343
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
344
-		$this->object->move( 'file1', 'file2' );
343
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
344
+		$this->object->move('file1', 'file2');
345 345
 	}
346 346
 
347 347
 
348 348
 	public function testCopy()
349 349
 	{
350
-		$this->mock->expects( $this->once() )->method( 'copy' );
350
+		$this->mock->expects($this->once())->method('copy');
351 351
 
352
-		$this->object->copy( 'file1', 'file2' );
352
+		$this->object->copy('file1', 'file2');
353 353
 	}
354 354
 
355 355
 
356 356
 	public function testCopyException()
357 357
 	{
358
-		$this->mock->expects( $this->once() )->method( 'copy' )
359
-			->will( $this->throwException( new \RuntimeException() ) );
358
+		$this->mock->expects($this->once())->method('copy')
359
+			->will($this->throwException(new \RuntimeException()));
360 360
 
361
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
362
-		$this->object->copy( 'file1', 'file2' );
361
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
362
+		$this->object->copy('file1', 'file2');
363 363
 	}
364 364
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/LaravelTest.php 1 patch
Spacing   +139 added lines, -139 removed lines patch added patch discarded remove patch
@@ -18,43 +18,43 @@  discard block
 block discarded – undo
18 18
 	{
19 19
 		$this->context = \TestHelper::getContext();
20 20
 		$this->editor = $this->context->getEditor();
21
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $this->context, 'Laravel' );
22
-		$this->object = $manager->getSubManager( 'lists', 'Laravel' );
21
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($this->context, 'Laravel');
22
+		$this->object = $manager->getSubManager('lists', 'Laravel');
23 23
 	}
24 24
 
25 25
 
26 26
 	protected function tearDown()
27 27
 	{
28
-		unset( $this->object, $this->context );
28
+		unset($this->object, $this->context);
29 29
 	}
30 30
 
31 31
 
32 32
 	public function testCleanup()
33 33
 	{
34
-		$this->object->cleanup( array( -1 ) );
34
+		$this->object->cleanup(array( -1 ));
35 35
 	}
36 36
 
37 37
 
38 38
 	public function testAggregate()
39 39
 	{
40
-		$search = $this->object->createSearch( true );
40
+		$search = $this->object->createSearch(true);
41 41
 		$expr = array(
42 42
 			$search->getConditions(),
43
-			$search->compare( '==', 'customer.lists.editor', 'ai-laravel:unittest' ),
43
+			$search->compare('==', 'customer.lists.editor', 'ai-laravel:unittest'),
44 44
 		);
45
-		$search->setConditions( $search->combine( '&&', $expr ) );
45
+		$search->setConditions($search->combine('&&', $expr));
46 46
 
47
-		$result = $this->object->aggregate( $search, 'customer.lists.domain' );
47
+		$result = $this->object->aggregate($search, 'customer.lists.domain');
48 48
 
49
-		$this->assertEquals( 1, count( $result ) );
50
-		$this->assertArrayHasKey( 'text', $result );
51
-		$this->assertEquals( 4, $result['text'] );
49
+		$this->assertEquals(1, count($result));
50
+		$this->assertArrayHasKey('text', $result);
51
+		$this->assertEquals(4, $result['text']);
52 52
 	}
53 53
 
54 54
 
55 55
 	public function testCreateItem()
56 56
 	{
57
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $this->object->createItem() );
57
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Item\\Lists\\Iface', $this->object->createItem());
58 58
 	}
59 59
 
60 60
 
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 	{
63 63
 		$search = $this->object->createSearch();
64 64
 		$search->setSlice(0, 1);
65
-		$results = $this->object->searchItems( $search );
65
+		$results = $this->object->searchItems($search);
66 66
 
67
-		if( ( $item = reset( $results ) ) === false ) {
68
-			throw new \RuntimeException( 'No item found' );
67
+		if (($item = reset($results)) === false) {
68
+			throw new \RuntimeException('No item found');
69 69
 		}
70 70
 
71
-		$this->assertEquals( $item, $this->object->getItem( $item->getId() ) );
71
+		$this->assertEquals($item, $this->object->getItem($item->getId()));
72 72
 	}
73 73
 
74 74
 
@@ -76,145 +76,145 @@  discard block
 block discarded – undo
76 76
 	{
77 77
 		$search = $this->object->createSearch();
78 78
 		$search->setSlice(0, 1);
79
-		$items = $this->object->searchItems( $search );
79
+		$items = $this->object->searchItems($search);
80 80
 
81
-		if( ( $item = reset( $items ) ) === false ) {
82
-			throw new \RuntimeException( 'No item found' );
81
+		if (($item = reset($items)) === false) {
82
+			throw new \RuntimeException('No item found');
83 83
 		}
84 84
 
85
-		$item->setId( null );
86
-		$item->setDomain( 'unittest' );
87
-		$resultSaved = $this->object->saveItem( $item );
88
-		$itemSaved = $this->object->getItem( $item->getId() );
85
+		$item->setId(null);
86
+		$item->setDomain('unittest');
87
+		$resultSaved = $this->object->saveItem($item);
88
+		$itemSaved = $this->object->getItem($item->getId());
89 89
 
90 90
 		$itemExp = clone $itemSaved;
91
-		$itemExp->setDomain( 'unittest2' );
92
-		$resultUpd = $this->object->saveItem( $itemExp );
93
-		$itemUpd = $this->object->getItem( $itemExp->getId() );
94
-
95
-		$this->object->deleteItem( $itemSaved->getId() );
96
-
97
-
98
-		$this->assertTrue( $item->getId() !== null );
99
-		$this->assertEquals( $item->getId(), $itemSaved->getId() );
100
-		$this->assertEquals( $item->getSiteId(), $itemSaved->getSiteId() );
101
-		$this->assertEquals( $item->getParentId(), $itemSaved->getParentId() );
102
-		$this->assertEquals( $item->getType(), $itemSaved->getType() );
103
-		$this->assertEquals( $item->getRefId(), $itemSaved->getRefId() );
104
-		$this->assertEquals( $item->getDomain(), $itemSaved->getDomain() );
105
-		$this->assertEquals( $item->getDateStart(), $itemSaved->getDateStart() );
106
-		$this->assertEquals( $item->getDateEnd(), $itemSaved->getDateEnd() );
107
-		$this->assertEquals( $item->getPosition(), $itemSaved->getPosition() );
108
-		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
91
+		$itemExp->setDomain('unittest2');
92
+		$resultUpd = $this->object->saveItem($itemExp);
93
+		$itemUpd = $this->object->getItem($itemExp->getId());
94
+
95
+		$this->object->deleteItem($itemSaved->getId());
96
+
97
+
98
+		$this->assertTrue($item->getId() !== null);
99
+		$this->assertEquals($item->getId(), $itemSaved->getId());
100
+		$this->assertEquals($item->getSiteId(), $itemSaved->getSiteId());
101
+		$this->assertEquals($item->getParentId(), $itemSaved->getParentId());
102
+		$this->assertEquals($item->getType(), $itemSaved->getType());
103
+		$this->assertEquals($item->getRefId(), $itemSaved->getRefId());
104
+		$this->assertEquals($item->getDomain(), $itemSaved->getDomain());
105
+		$this->assertEquals($item->getDateStart(), $itemSaved->getDateStart());
106
+		$this->assertEquals($item->getDateEnd(), $itemSaved->getDateEnd());
107
+		$this->assertEquals($item->getPosition(), $itemSaved->getPosition());
108
+		$this->assertEquals($this->editor, $itemSaved->getEditor());
109 109
 		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeCreated());
110 110
 		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeModified());
111 111
 
112
-		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
113
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() );
114
-		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
112
+		$this->assertEquals($this->editor, $itemSaved->getEditor());
113
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated());
114
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified());
115 115
 
116
-		$this->assertEquals( $itemExp->getId(), $itemUpd->getId() );
117
-		$this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() );
118
-		$this->assertEquals( $itemExp->getParentId(), $itemUpd->getParentId() );
119
-		$this->assertEquals( $itemExp->getType(), $itemUpd->getType() );
120
-		$this->assertEquals( $itemExp->getRefId(), $itemUpd->getRefId() );
121
-		$this->assertEquals( $itemExp->getDomain(), $itemUpd->getDomain() );
122
-		$this->assertEquals( $itemExp->getDateStart(), $itemUpd->getDateStart() );
123
-		$this->assertEquals( $itemExp->getDateEnd(), $itemUpd->getDateEnd() );
124
-		$this->assertEquals( $itemExp->getPosition(), $itemUpd->getPosition() );
116
+		$this->assertEquals($itemExp->getId(), $itemUpd->getId());
117
+		$this->assertEquals($itemExp->getSiteId(), $itemUpd->getSiteId());
118
+		$this->assertEquals($itemExp->getParentId(), $itemUpd->getParentId());
119
+		$this->assertEquals($itemExp->getType(), $itemUpd->getType());
120
+		$this->assertEquals($itemExp->getRefId(), $itemUpd->getRefId());
121
+		$this->assertEquals($itemExp->getDomain(), $itemUpd->getDomain());
122
+		$this->assertEquals($itemExp->getDateStart(), $itemUpd->getDateStart());
123
+		$this->assertEquals($itemExp->getDateEnd(), $itemUpd->getDateEnd());
124
+		$this->assertEquals($itemExp->getPosition(), $itemUpd->getPosition());
125 125
 
126
-		$this->assertEquals( $this->editor, $itemUpd->getEditor() );
127
-		$this->assertEquals( $itemExp->getTimeCreated(), $itemUpd->getTimeCreated() );
128
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified() );
126
+		$this->assertEquals($this->editor, $itemUpd->getEditor());
127
+		$this->assertEquals($itemExp->getTimeCreated(), $itemUpd->getTimeCreated());
128
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified());
129 129
 
130
-		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved );
131
-		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd );
130
+		$this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultSaved);
131
+		$this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultUpd);
132 132
 
133 133
 		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
134
-		$this->object->getItem( $itemSaved->getId() );
134
+		$this->object->getItem($itemSaved->getId());
135 135
 	}
136 136
 
137 137
 
138 138
 	public function testMoveItemLastToFront()
139 139
 	{
140 140
 		$listItems = $this->getListItems();
141
-		$this->assertGreaterThan( 1, count( $listItems ) );
141
+		$this->assertGreaterThan(1, count($listItems));
142 142
 
143
-		if( ( $first = reset( $listItems ) ) === false ) {
144
-			throw new \RuntimeException( 'No first customer list item' );
143
+		if (($first = reset($listItems)) === false) {
144
+			throw new \RuntimeException('No first customer list item');
145 145
 		}
146 146
 
147
-		if( ( $last = end( $listItems ) ) === false ) {
148
-			throw new \RuntimeException( 'No last customer list item' );
147
+		if (($last = end($listItems)) === false) {
148
+			throw new \RuntimeException('No last customer list item');
149 149
 		}
150 150
 
151
-		$this->object->moveItem( $last->getId(), $first->getId() );
151
+		$this->object->moveItem($last->getId(), $first->getId());
152 152
 
153
-		$newFirst = $this->object->getItem( $last->getId() );
154
-		$newSecond = $this->object->getItem( $first->getId() );
153
+		$newFirst = $this->object->getItem($last->getId());
154
+		$newSecond = $this->object->getItem($first->getId());
155 155
 
156
-		$this->object->moveItem( $last->getId() );
156
+		$this->object->moveItem($last->getId());
157 157
 
158
-		$this->assertEquals( 1, $newFirst->getPosition() );
159
-		$this->assertEquals( 2, $newSecond->getPosition() );
158
+		$this->assertEquals(1, $newFirst->getPosition());
159
+		$this->assertEquals(2, $newSecond->getPosition());
160 160
 	}
161 161
 
162 162
 
163 163
 	public function testMoveItemFirstToLast()
164 164
 	{
165 165
 		$listItems = $this->getListItems();
166
-		$this->assertGreaterThan( 1, count( $listItems ) );
166
+		$this->assertGreaterThan(1, count($listItems));
167 167
 
168
-		if( ( $first = reset( $listItems ) ) === false ) {
169
-			throw new \RuntimeException( 'No first customer list item' );
168
+		if (($first = reset($listItems)) === false) {
169
+			throw new \RuntimeException('No first customer list item');
170 170
 		}
171 171
 
172
-		if( ( $second = next( $listItems ) ) === false ) {
173
-			throw new \RuntimeException( 'No second customer list item' );
172
+		if (($second = next($listItems)) === false) {
173
+			throw new \RuntimeException('No second customer list item');
174 174
 		}
175 175
 
176
-		if( ( $last = end( $listItems ) ) === false ) {
177
-			throw new \RuntimeException( 'No last customer list item' );
176
+		if (($last = end($listItems)) === false) {
177
+			throw new \RuntimeException('No last customer list item');
178 178
 		}
179 179
 
180
-		$this->object->moveItem( $first->getId() );
180
+		$this->object->moveItem($first->getId());
181 181
 
182
-		$newBefore = $this->object->getItem( $last->getId() );
183
-		$newLast = $this->object->getItem( $first->getId() );
182
+		$newBefore = $this->object->getItem($last->getId());
183
+		$newLast = $this->object->getItem($first->getId());
184 184
 
185
-		$this->object->moveItem( $first->getId(), $second->getId() );
185
+		$this->object->moveItem($first->getId(), $second->getId());
186 186
 
187
-		$this->assertEquals( $last->getPosition() - 1, $newBefore->getPosition() );
188
-		$this->assertEquals( $last->getPosition(), $newLast->getPosition() );
187
+		$this->assertEquals($last->getPosition() - 1, $newBefore->getPosition());
188
+		$this->assertEquals($last->getPosition(), $newLast->getPosition());
189 189
 	}
190 190
 
191 191
 
192 192
 	public function testMoveItemFirstUp()
193 193
 	{
194 194
 		$listItems = $this->getListItems();
195
-		$this->assertGreaterThan( 1, count( $listItems ) );
195
+		$this->assertGreaterThan(1, count($listItems));
196 196
 
197
-		if( ( $first = reset( $listItems ) ) === false ) {
198
-			throw new \RuntimeException( 'No first customer list item' );
197
+		if (($first = reset($listItems)) === false) {
198
+			throw new \RuntimeException('No first customer list item');
199 199
 		}
200 200
 
201
-		if( ( $second = next( $listItems ) ) === false ) {
202
-			throw new \RuntimeException( 'No second customer list item' );
201
+		if (($second = next($listItems)) === false) {
202
+			throw new \RuntimeException('No second customer list item');
203 203
 		}
204 204
 
205
-		if( ( $last = end( $listItems ) ) === false ) {
206
-			throw new \RuntimeException( 'No last customer list item' );
205
+		if (($last = end($listItems)) === false) {
206
+			throw new \RuntimeException('No last customer list item');
207 207
 		}
208 208
 
209
-		$this->object->moveItem( $first->getId(), $last->getId() );
209
+		$this->object->moveItem($first->getId(), $last->getId());
210 210
 
211
-		$newLast = $this->object->getItem( $last->getId() );
212
-		$newUp = $this->object->getItem( $first->getId() );
211
+		$newLast = $this->object->getItem($last->getId());
212
+		$newUp = $this->object->getItem($first->getId());
213 213
 
214
-		$this->object->moveItem( $first->getId(), $second->getId() );
214
+		$this->object->moveItem($first->getId(), $second->getId());
215 215
 
216
-		$this->assertEquals( $last->getPosition() - 1, $newUp->getPosition() );
217
-		$this->assertEquals( $last->getPosition(), $newLast->getPosition() );
216
+		$this->assertEquals($last->getPosition() - 1, $newUp->getPosition());
217
+		$this->assertEquals($last->getPosition(), $newLast->getPosition());
218 218
 	}
219 219
 
220 220
 
@@ -224,29 +224,29 @@  discard block
 block discarded – undo
224 224
 		$search = $this->object->createSearch();
225 225
 
226 226
 		$expr = [];
227
-		$expr[] = $search->compare( '!=', 'customer.lists.id', null );
228
-		$expr[] = $search->compare( '!=', 'customer.lists.siteid', null );
229
-		$expr[] = $search->compare( '>', 'customer.lists.parentid', 0 );
230
-		$expr[] = $search->compare( '==', 'customer.lists.domain', 'text' );
231
-		$expr[] = $search->compare( '==', 'customer.lists.type', 'default' );
232
-		$expr[] = $search->compare( '>', 'customer.lists.refid', '' );
233
-		$expr[] = $search->compare( '==', 'customer.lists.datestart', '2010-01-01 00:00:00' );
234
-		$expr[] = $search->compare( '==', 'customer.lists.dateend', '2100-01-01 00:00:00' );
235
-		$expr[] = $search->compare( '!=', 'customer.lists.config', null );
236
-		$expr[] = $search->compare( '>', 'customer.lists.position', 1 );
237
-		$expr[] = $search->compare( '==', 'customer.lists.status', 1 );
238
-		$expr[] = $search->compare( '>=', 'customer.lists.mtime', '1970-01-01 00:00:00' );
239
-		$expr[] = $search->compare( '>=', 'customer.lists.ctime', '1970-01-01 00:00:00' );
240
-		$expr[] = $search->compare( '==', 'customer.lists.editor', $this->editor );
241
-
242
-		$search->setConditions( $search->combine( '&&', $expr ) );
227
+		$expr[] = $search->compare('!=', 'customer.lists.id', null);
228
+		$expr[] = $search->compare('!=', 'customer.lists.siteid', null);
229
+		$expr[] = $search->compare('>', 'customer.lists.parentid', 0);
230
+		$expr[] = $search->compare('==', 'customer.lists.domain', 'text');
231
+		$expr[] = $search->compare('==', 'customer.lists.type', 'default');
232
+		$expr[] = $search->compare('>', 'customer.lists.refid', '');
233
+		$expr[] = $search->compare('==', 'customer.lists.datestart', '2010-01-01 00:00:00');
234
+		$expr[] = $search->compare('==', 'customer.lists.dateend', '2100-01-01 00:00:00');
235
+		$expr[] = $search->compare('!=', 'customer.lists.config', null);
236
+		$expr[] = $search->compare('>', 'customer.lists.position', 1);
237
+		$expr[] = $search->compare('==', 'customer.lists.status', 1);
238
+		$expr[] = $search->compare('>=', 'customer.lists.mtime', '1970-01-01 00:00:00');
239
+		$expr[] = $search->compare('>=', 'customer.lists.ctime', '1970-01-01 00:00:00');
240
+		$expr[] = $search->compare('==', 'customer.lists.editor', $this->editor);
241
+
242
+		$search->setConditions($search->combine('&&', $expr));
243 243
 		$search->setSlice(0, 1);
244
-		$results = $this->object->searchItems( $search, [], $total );
245
-		$this->assertEquals( 1, count( $results ) );
246
-		$this->assertEquals( 2, $total );
244
+		$results = $this->object->searchItems($search, [], $total);
245
+		$this->assertEquals(1, count($results));
246
+		$this->assertEquals(2, $total);
247 247
 
248
-		foreach($results as $itemId => $item) {
249
-			$this->assertEquals( $itemId, $item->getId() );
248
+		foreach ($results as $itemId => $item) {
249
+			$this->assertEquals($itemId, $item->getId());
250 250
 		}
251 251
 	}
252 252
 
@@ -254,8 +254,8 @@  discard block
 block discarded – undo
254 254
 	public function testSearchItemsNoCriteria()
255 255
 	{
256 256
 		$search = $this->object->createSearch();
257
-		$search->setConditions( $search->compare( '==', 'customer.lists.editor', $this->editor ) );
258
-		$this->assertEquals( 4, count( $this->object->searchItems($search) ) );
257
+		$search->setConditions($search->compare('==', 'customer.lists.editor', $this->editor));
258
+		$this->assertEquals(4, count($this->object->searchItems($search)));
259 259
 	}
260 260
 
261 261
 
@@ -263,48 +263,48 @@  discard block
 block discarded – undo
263 263
 	{
264 264
 		$search = $this->object->createSearch(true);
265 265
 		$conditions = array(
266
-			$search->compare( '==', 'customer.lists.editor', $this->editor ),
266
+			$search->compare('==', 'customer.lists.editor', $this->editor),
267 267
 			$search->getConditions()
268 268
 		);
269
-		$search->setConditions( $search->combine( '&&', $conditions ) );
270
-		$this->assertEquals( 4, count( $this->object->searchItems($search) ) );
269
+		$search->setConditions($search->combine('&&', $conditions));
270
+		$this->assertEquals(4, count($this->object->searchItems($search)));
271 271
 	}
272 272
 
273 273
 
274 274
 	public function testGetSubManager()
275 275
 	{
276
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') );
277
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') );
276
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type'));
277
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard'));
278 278
 
279
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
280
-		$this->object->getSubManager( 'unknown' );
279
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
280
+		$this->object->getSubManager('unknown');
281 281
 	}
282 282
 
283 283
 
284 284
 	protected function getListItems()
285 285
 	{
286
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $this->context, 'Laravel' );
286
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($this->context, 'Laravel');
287 287
 
288 288
 		$search = $manager->createSearch();
289
-		$search->setConditions( $search->compare( '==', 'customer.code', 'UTC003' ) );
290
-		$search->setSlice( 0, 1 );
289
+		$search->setConditions($search->compare('==', 'customer.code', 'UTC003'));
290
+		$search->setSlice(0, 1);
291 291
 
292
-		$results = $manager->searchItems( $search );
292
+		$results = $manager->searchItems($search);
293 293
 
294
-		if( ( $item = reset( $results ) ) === false ) {
295
-			throw new \RuntimeException( 'No customer item found' );
294
+		if (($item = reset($results)) === false) {
295
+			throw new \RuntimeException('No customer item found');
296 296
 		}
297 297
 
298 298
 		$search = $this->object->createSearch();
299 299
 		$expr = array(
300
-			$search->compare( '==', 'customer.lists.parentid', $item->getId() ),
301
-			$search->compare( '==', 'customer.lists.domain', 'text' ),
302
-			$search->compare( '==', 'customer.lists.editor', $this->editor ),
303
-			$search->compare( '==', 'customer.lists.type', 'default' ),
300
+			$search->compare('==', 'customer.lists.parentid', $item->getId()),
301
+			$search->compare('==', 'customer.lists.domain', 'text'),
302
+			$search->compare('==', 'customer.lists.editor', $this->editor),
303
+			$search->compare('==', 'customer.lists.type', 'default'),
304 304
 		);
305
-		$search->setConditions( $search->combine( '&&', $expr ) );
306
-		$search->setSortations( array( $search->sort( '+', 'customer.lists.position' ) ) );
305
+		$search->setConditions($search->combine('&&', $expr));
306
+		$search->setSortations(array($search->sort('+', 'customer.lists.position')));
307 307
 
308
-		return $this->object->searchItems( $search );
308
+		return $this->object->searchItems($search);
309 309
 	}
310 310
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Property/LaravelTest.php 1 patch
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -20,89 +20,89 @@  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::class );
50
-		$this->object->saveItem( new \Aimeos\MShop\Locale\Item\Standard() );
49
+		$this->setExpectedException(\Aimeos\MW\Common\Exception::class);
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->assertEquals( $item->getId(), $itemSaved->getId() );
80
-		$this->assertEquals( $item->getParentId(), $itemSaved->getParentId() );
81
-		$this->assertEquals( $item->getSiteId(), $itemSaved->getSiteId() );
82
-		$this->assertEquals( $item->getType(), $itemSaved->getType() );
83
-		$this->assertEquals( $item->getLanguageId(), $itemSaved->getLanguageId() );
84
-		$this->assertEquals( $item->getValue(), $itemSaved->getValue() );
85
-
86
-		$this->assertEquals( $context->getEditor(), $itemSaved->getEditor() );
87
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() );
88
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
89
-
90
-		$this->assertEquals( $itemExp->getId(), $itemUpd->getId() );
91
-		$this->assertEquals( $itemExp->getParentId(), $itemUpd->getParentId() );
92
-		$this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() );
93
-		$this->assertEquals( $itemExp->getType(), $itemUpd->getType() );
94
-		$this->assertEquals( $itemExp->getLanguageId(), $itemUpd->getLanguageId() );
95
-		$this->assertEquals( $itemExp->getValue(), $itemUpd->getValue() );
96
-
97
-		$this->assertEquals( $context->getEditor(), $itemUpd->getEditor() );
98
-		$this->assertEquals( $itemExp->getTimeCreated(), $itemUpd->getTimeCreated() );
99
-		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified() );
100
-
101
-		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved );
102
-		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd );
103
-
104
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
105
-		$this->object->getItem( $itemSaved->getId() );
78
+		$this->assertTrue($item->getId() !== null);
79
+		$this->assertEquals($item->getId(), $itemSaved->getId());
80
+		$this->assertEquals($item->getParentId(), $itemSaved->getParentId());
81
+		$this->assertEquals($item->getSiteId(), $itemSaved->getSiteId());
82
+		$this->assertEquals($item->getType(), $itemSaved->getType());
83
+		$this->assertEquals($item->getLanguageId(), $itemSaved->getLanguageId());
84
+		$this->assertEquals($item->getValue(), $itemSaved->getValue());
85
+
86
+		$this->assertEquals($context->getEditor(), $itemSaved->getEditor());
87
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated());
88
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified());
89
+
90
+		$this->assertEquals($itemExp->getId(), $itemUpd->getId());
91
+		$this->assertEquals($itemExp->getParentId(), $itemUpd->getParentId());
92
+		$this->assertEquals($itemExp->getSiteId(), $itemUpd->getSiteId());
93
+		$this->assertEquals($itemExp->getType(), $itemUpd->getType());
94
+		$this->assertEquals($itemExp->getLanguageId(), $itemUpd->getLanguageId());
95
+		$this->assertEquals($itemExp->getValue(), $itemUpd->getValue());
96
+
97
+		$this->assertEquals($context->getEditor(), $itemUpd->getEditor());
98
+		$this->assertEquals($itemExp->getTimeCreated(), $itemUpd->getTimeCreated());
99
+		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemUpd->getTimeModified());
100
+
101
+		$this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultSaved);
102
+		$this->assertInstanceOf(\Aimeos\MShop\Common\Item\Iface::class, $resultUpd);
103
+
104
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
105
+		$this->object->getItem($itemSaved->getId());
106 106
 	}
107 107
 
108 108
 
@@ -110,18 +110,18 @@  discard block
 block discarded – undo
110 110
 	{
111 111
 		$search = $this->object->createSearch();
112 112
 		$conditions = array(
113
-			$search->compare( '~=', 'customer.property.value', '1'),
114
-			$search->compare( '==', 'customer.property.editor', $this->editor )
113
+			$search->compare('~=', 'customer.property.value', '1'),
114
+			$search->compare('==', 'customer.property.editor', $this->editor)
115 115
 		);
116
-		$search->setConditions( $search->combine( '&&', $conditions ) );
117
-		$results = $this->object->searchItems( $search );
116
+		$search->setConditions($search->combine('&&', $conditions));
117
+		$results = $this->object->searchItems($search);
118 118
 
119
-		if( ($expected = reset($results)) === false ) {
120
-			throw new \RuntimeException( sprintf( 'No customer property item found for value "%1$s".', '1' ) );
119
+		if (($expected = reset($results)) === false) {
120
+			throw new \RuntimeException(sprintf('No customer property item found for value "%1$s".', '1'));
121 121
 		}
122 122
 
123
-		$actual = $this->object->getItem( $expected->getId() );
124
-		$this->assertEquals( $expected, $actual );
123
+		$actual = $this->object->getItem($expected->getId());
124
+		$this->assertEquals($expected, $actual);
125 125
 	}
126 126
 
127 127
 
@@ -129,14 +129,14 @@  discard block
 block discarded – undo
129 129
 	{
130 130
 		$result = $this->object->getResourceType();
131 131
 
132
-		$this->assertContains( 'customer/property', $result );
132
+		$this->assertContains('customer/property', $result);
133 133
 	}
134 134
 
135 135
 
136 136
 	public function testGetSearchAttributes()
137 137
 	{
138
-		foreach( $this->object->getSearchAttributes() as $attribute ) {
139
-			$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute );
138
+		foreach ($this->object->getSearchAttributes() as $attribute) {
139
+			$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute);
140 140
 		}
141 141
 	}
142 142
 
@@ -147,20 +147,20 @@  discard block
 block discarded – undo
147 147
 		$search = $this->object->createSearch();
148 148
 
149 149
 		$expr = [];
150
-		$expr[] = $search->compare( '!=', 'customer.property.id', null );
151
-		$expr[] = $search->compare( '!=', 'customer.property.parentid', null );
152
-		$expr[] = $search->compare( '!=', 'customer.property.siteid', null );
153
-		$expr[] = $search->compare( '==', 'customer.property.type', 'newsletter' );
154
-		$expr[] = $search->compare( '==', 'customer.property.languageid', null );
155
-		$expr[] = $search->compare( '==', 'customer.property.value', '1' );
156
-		$expr[] = $search->compare( '==', 'customer.property.editor', $this->editor );
150
+		$expr[] = $search->compare('!=', 'customer.property.id', null);
151
+		$expr[] = $search->compare('!=', 'customer.property.parentid', null);
152
+		$expr[] = $search->compare('!=', 'customer.property.siteid', null);
153
+		$expr[] = $search->compare('==', 'customer.property.type', 'newsletter');
154
+		$expr[] = $search->compare('==', 'customer.property.languageid', null);
155
+		$expr[] = $search->compare('==', 'customer.property.value', '1');
156
+		$expr[] = $search->compare('==', 'customer.property.editor', $this->editor);
157 157
 	}
158 158
 
159 159
 
160 160
 	public function testGetSubManager()
161 161
 	{
162
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') );
163
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') );
162
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type'));
163
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard'));
164 164
 
165 165
 		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
166 166
 		$this->object->getSubManager('unknown');
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Property/Type/Laravel.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -104,14 +104,14 @@  discard block
 block discarded – undo
104 104
 	 *
105 105
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
106 106
 	 */
107
-	public function cleanup( array $siteids )
107
+	public function cleanup(array $siteids)
108 108
 	{
109 109
 		$path = 'mshop/customer/manager/property/type/submanagers';
110
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
111
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
110
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
111
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
112 112
 		}
113 113
 
114
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/property/type/laravel/delete' );
114
+		$this->cleanupBase($siteids, 'mshop/customer/manager/property/type/laravel/delete');
115 115
 	}
116 116
 
117 117
 
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
 	 * @param boolean $withsub Return also attributes of sub-managers if true
122 122
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
123 123
 	 */
124
-	public function getSearchAttributes( $withsub = true )
124
+	public function getSearchAttributes($withsub = true)
125 125
 	{
126 126
 		$path = 'mshop/customer/manager/property/type/submanagers';
127 127
 
128
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, [], $withsub );
128
+		return $this->getSearchAttributesBase($this->searchConfig, $path, [], $withsub);
129 129
 	}
130 130
 
131 131
 
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
137 137
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g types, lists etc.
138 138
 	 */
139
-	public function getSubManager( $manager, $name = null )
139
+	public function getSubManager($manager, $name = null)
140 140
 	{
141
-		return $this->getSubManagerBase( 'customer', 'property/type/' . $manager, ( $name === null ? 'Laravel' : $name ) );
141
+		return $this->getSubManagerBase('customer', 'property/type/'.$manager, ($name === null ? 'Laravel' : $name));
142 142
 	}
143 143
 
144 144
 
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,
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @param integer[] $siteids List of IDs for sites whose entries should be deleted
101 101
 	 */
102
-	public function cleanup( array $siteids )
102
+	public function cleanup(array $siteids)
103 103
 	{
104 104
 		$path = 'mshop/customer/manager/property/submanagers';
105
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
106
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
105
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
106
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
107 107
 		}
108 108
 
109
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/property/laravel/delete' );
109
+		$this->cleanupBase($siteids, 'mshop/customer/manager/property/laravel/delete');
110 110
 	}
111 111
 
112 112
 
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 	 * @param boolean $withsub Return also attributes of sub-managers if true
117 117
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
118 118
 	 */
119
-	public function getSearchAttributes( $withsub = true )
119
+	public function getSearchAttributes($withsub = true)
120 120
 	{
121 121
 		$path = 'mshop/customer/manager/property/submanagers';
122 122
 
123
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, [], $withsub );
123
+		return $this->getSearchAttributesBase($this->searchConfig, $path, [], $withsub);
124 124
 	}
125 125
 
126 126
 
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
 	 * configuration (or Default) if null
133 133
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g property types, property lists etc.
134 134
 	 */
135
-	public function getSubManager( $manager, $name = null )
135
+	public function getSubManager($manager, $name = null)
136 136
 	{
137
-		return $this->getSubManagerBase( 'customer', 'property/' . $manager, ( $name === null ? 'Laravel' : $name ) );
137
+		return $this->getSubManagerBase('customer', 'property/'.$manager, ($name === null ? 'Laravel' : $name));
138 138
 	}
139 139
 
140 140
 
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer-property.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2018
6 6
  */
7 7
 
8
-return array (
8
+return array(
9 9
 	'customer/property/type' => array(
10
-		'customer/property/type/newsletter' => array( 'domain' => 'customer', 'code' => 'newsletter', 'label' => 'Newsletter', 'status' => 1 ),
10
+		'customer/property/type/newsletter' => array('domain' => 'customer', 'code' => 'newsletter', 'label' => 'Newsletter', 'status' => 1),
11 11
 	),
12 12
 
13 13
 	'customer/property' => array(
14
-		'customer/property/UTC001/newsletter' => array( 'parentid' => 'customer/UTC001', 'type' => 'newsletter', 'langid' => null, 'value' => '1' ),
14
+		'customer/property/UTC001/newsletter' => array('parentid' => 'customer/UTC001', 'type' => 'newsletter', 'langid' => null, 'value' => '1'),
15 15
 	),
16 16
 );
17 17
\ No newline at end of file
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', 'type' => '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', 'type' => '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', 'type' => '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', 'type' => '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', 'type' => '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', 'type' => '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', 'type' => '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', 'type' => '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.