Completed
Push — master ( 0e2880...c1652d )
by Aimeos
05:28
created
lib/custom/tests/MW/Filesystem/FlyTest.php 1 patch
Spacing   +148 added lines, -148 removed lines patch added patch discarded remove patch
@@ -11,394 +11,394 @@
 block discarded – undo
11 11
 
12 12
 	protected function setUp()
13 13
 	{
14
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
15
-			$this->markTestSkipped( 'Install Flysystem first' );
14
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
15
+			$this->markTestSkipped('Install Flysystem first');
16 16
 		}
17 17
 
18
-		$this->object = $this->getMockBuilder( '\\Aimeos\\MW\\Filesystem\\FlyNone' )
19
-			->setConstructorArgs( array( array( 'adapter' => 'FlyNone' ) ) )
20
-			->setMethods( array( 'getProvider' ) )
18
+		$this->object = $this->getMockBuilder('\\Aimeos\\MW\\Filesystem\\FlyNone')
19
+			->setConstructorArgs(array(array('adapter' => 'FlyNone')))
20
+			->setMethods(array('getProvider'))
21 21
 			->getMock();
22 22
 
23
-		$this->mock = $this->getMockBuilder( '\\League\\Flysystem\\FilesystemInterface' )
23
+		$this->mock = $this->getMockBuilder('\\League\\Flysystem\\FilesystemInterface')
24 24
 			->disableOriginalConstructor()
25 25
 			->getMock();
26 26
 
27
-		$this->object->expects( $this->once() )->method( 'getProvider' )
28
-			->will( $this->returnValue( $this->mock ) );
27
+		$this->object->expects($this->once())->method('getProvider')
28
+			->will($this->returnValue($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 testIsdir()
39 39
 	{
40
-		$this->mock->expects( $this->once() )->method( 'getMetadata' )
41
-			->will( $this->returnValue( array( 'type' => 'dir' ) ) );
40
+		$this->mock->expects($this->once())->method('getMetadata')
41
+			->will($this->returnValue(array('type' => 'dir')));
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( 'getMetadata' )
50
-			->will( $this->returnValue( array( 'type' => 'file' ) ) );
49
+		$this->mock->expects($this->once())->method('getMetadata')
50
+			->will($this->returnValue(array('type' => 'file')));
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( 'createDir' )
59
-			->will( $this->returnValue( true ) );
58
+		$this->mock->expects($this->once())->method('createDir')
59
+			->will($this->returnValue(true));
60 60
 
61
-		$this->object->mkdir( 'test' );
61
+		$this->object->mkdir('test');
62 62
 	}
63 63
 
64 64
 
65 65
 	public function testMkdirException()
66 66
 	{
67
-		$this->mock->expects( $this->once() )->method( 'createDir' )
68
-			->will( $this->returnValue( false ) );
67
+		$this->mock->expects($this->once())->method('createDir')
68
+			->will($this->returnValue(false));
69 69
 
70
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
71
-		$this->object->mkdir( 'test' );
70
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
71
+		$this->object->mkdir('test');
72 72
 	}
73 73
 
74 74
 
75 75
 	public function testRmdir()
76 76
 	{
77
-		$this->mock->expects( $this->once() )->method( 'deleteDir' )
78
-			->will( $this->returnValue( true ) );
77
+		$this->mock->expects($this->once())->method('deleteDir')
78
+			->will($this->returnValue(true));
79 79
 
80
-		$this->object->rmdir( 'test' );
80
+		$this->object->rmdir('test');
81 81
 	}
82 82
 
83 83
 
84 84
 	public function testRmdirException()
85 85
 	{
86
-		$this->mock->expects( $this->once() )->method( 'deleteDir' )
87
-			->will( $this->returnValue( false ) );
86
+		$this->mock->expects($this->once())->method('deleteDir')
87
+			->will($this->returnValue(false));
88 88
 
89
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
90
-		$this->object->rmdir( 'test' );
89
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
90
+		$this->object->rmdir('test');
91 91
 	}
92 92
 
93 93
 
94 94
 	public function testScan()
95 95
 	{
96
-		$this->mock->expects( $this->once() )->method( 'listContents' )
97
-			->will( $this->returnValue( array( array( 'basename' => 'test' ) ) ) );
96
+		$this->mock->expects($this->once())->method('listContents')
97
+			->will($this->returnValue(array(array('basename' => 'test'))));
98 98
 
99
-		$this->assertEquals( array( 'test' ), $this->object->scan() );
99
+		$this->assertEquals(array('test'), $this->object->scan());
100 100
 	}
101 101
 
102 102
 
103 103
 	public function testSize()
104 104
 	{
105
-		$this->mock->expects( $this->once() )->method( 'getSize' )
106
-			->will( $this->returnValue( 4 ) );
105
+		$this->mock->expects($this->once())->method('getSize')
106
+			->will($this->returnValue(4));
107 107
 
108
-		$this->assertEquals( 4, $this->object->size( 'test' ) );
108
+		$this->assertEquals(4, $this->object->size('test'));
109 109
 	}
110 110
 
111 111
 
112 112
 	public function testSizeException()
113 113
 	{
114
-		$this->mock->expects( $this->once() )->method( 'getSize' )
115
-			->will( $this->returnValue( false ) );
114
+		$this->mock->expects($this->once())->method('getSize')
115
+			->will($this->returnValue(false));
116 116
 
117
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
118
-		$this->object->size( 'test' );
117
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
118
+		$this->object->size('test');
119 119
 	}
120 120
 
121 121
 
122 122
 	public function testSizeException2()
123 123
 	{
124
-		$this->mock->expects( $this->once() )->method( 'getSize' )
125
-		->will( $this->throwException( new \RuntimeException() ) );
124
+		$this->mock->expects($this->once())->method('getSize')
125
+		->will($this->throwException(new \RuntimeException()));
126 126
 
127
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
128
-		$this->object->size( 'test' );
127
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
128
+		$this->object->size('test');
129 129
 	}
130 130
 
131 131
 
132 132
 	public function testTime()
133 133
 	{
134
-		$this->mock->expects( $this->once() )->method( 'getTimestamp' )
135
-			->will( $this->returnValue( 4 ) );
134
+		$this->mock->expects($this->once())->method('getTimestamp')
135
+			->will($this->returnValue(4));
136 136
 
137
-		$this->assertEquals( 4, $this->object->time( 'test' ) );
137
+		$this->assertEquals(4, $this->object->time('test'));
138 138
 	}
139 139
 
140 140
 
141 141
 	public function testTimeException()
142 142
 	{
143
-		$this->mock->expects( $this->once() )->method( 'getTimestamp' )
144
-			->will( $this->returnValue( false ) );
143
+		$this->mock->expects($this->once())->method('getTimestamp')
144
+			->will($this->returnValue(false));
145 145
 
146
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
147
-		$this->object->time( 'test' );
146
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
147
+		$this->object->time('test');
148 148
 	}
149 149
 
150 150
 
151 151
 	public function testTimeException2()
152 152
 	{
153
-		$this->mock->expects( $this->once() )->method( 'getTimestamp' )
154
-			->will( $this->throwException( new \RuntimeException() ) );
153
+		$this->mock->expects($this->once())->method('getTimestamp')
154
+			->will($this->throwException(new \RuntimeException()));
155 155
 
156
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
157
-		$this->object->time( 'test' );
156
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
157
+		$this->object->time('test');
158 158
 	}
159 159
 
160 160
 
161 161
 	public function testRm()
162 162
 	{
163
-		$this->mock->expects( $this->once() )->method( 'delete' )
164
-		->will( $this->returnValue( 4 ) );
163
+		$this->mock->expects($this->once())->method('delete')
164
+		->will($this->returnValue(4));
165 165
 
166
-		$this->object->rm( 'test' );
166
+		$this->object->rm('test');
167 167
 	}
168 168
 
169 169
 
170 170
 	public function testRmException()
171 171
 	{
172
-		$this->mock->expects( $this->once() )->method( 'delete' )
173
-		->will( $this->throwException( new \RuntimeException() ) );
172
+		$this->mock->expects($this->once())->method('delete')
173
+		->will($this->throwException(new \RuntimeException()));
174 174
 
175
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
176
-		$this->object->rm( 'test' );
175
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
176
+		$this->object->rm('test');
177 177
 	}
178 178
 
179 179
 
180 180
 	public function testHas()
181 181
 	{
182
-		$this->mock->expects( $this->once() )->method( 'has' )
183
-			->will( $this->returnValue( true ) );
182
+		$this->mock->expects($this->once())->method('has')
183
+			->will($this->returnValue(true));
184 184
 
185
-		$result = $this->object->has( 'test' );
185
+		$result = $this->object->has('test');
186 186
 
187
-		$this->assertTrue( $result );
187
+		$this->assertTrue($result);
188 188
 	}
189 189
 
190 190
 
191 191
 	public function testHasFalse()
192 192
 	{
193
-		$this->mock->expects( $this->once() )->method( 'has' )
194
-			->will( $this->returnValue( false ) );
193
+		$this->mock->expects($this->once())->method('has')
194
+			->will($this->returnValue(false));
195 195
 
196
-		$result = $this->object->has( 'test' );
196
+		$result = $this->object->has('test');
197 197
 
198
-		$this->assertFalse( $result );
198
+		$this->assertFalse($result);
199 199
 	}
200 200
 
201 201
 
202 202
 	public function testRead()
203 203
 	{
204
-		$this->mock->expects( $this->once() )->method( 'read' )
205
-			->will( $this->returnValue( 'value' ) );
204
+		$this->mock->expects($this->once())->method('read')
205
+			->will($this->returnValue('value'));
206 206
 
207
-		$this->assertEquals( 'value', $this->object->read( 'test' ) );
207
+		$this->assertEquals('value', $this->object->read('test'));
208 208
 	}
209 209
 
210 210
 
211 211
 	public function testReadException()
212 212
 	{
213
-		$this->mock->expects( $this->once() )->method( 'read' )
214
-			->will( $this->returnValue( false ) );
213
+		$this->mock->expects($this->once())->method('read')
214
+			->will($this->returnValue(false));
215 215
 
216
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
217
-		$this->object->read( 'test' );
216
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
217
+		$this->object->read('test');
218 218
 	}
219 219
 
220 220
 
221 221
 	public function testReadException2()
222 222
 	{
223
-		$this->mock->expects( $this->once() )->method( 'read' )
224
-			->will( $this->throwException( new \RuntimeException() ) );
223
+		$this->mock->expects($this->once())->method('read')
224
+			->will($this->throwException(new \RuntimeException()));
225 225
 
226
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
227
-		$this->object->read( 'test' );
226
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
227
+		$this->object->read('test');
228 228
 	}
229 229
 
230 230
 
231 231
 	public function testReadf()
232 232
 	{
233
-		$file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'flytest';
234
-		file_put_contents( $file, 'test' );
233
+		$file = sys_get_temp_dir().DIRECTORY_SEPARATOR.'flytest';
234
+		file_put_contents($file, 'test');
235 235
 
236
-		$this->mock->expects( $this->once() )->method( 'readStream' )
237
-			->will( $this->returnValue( fopen( $file, 'r' ) ) );
236
+		$this->mock->expects($this->once())->method('readStream')
237
+			->will($this->returnValue(fopen($file, 'r')));
238 238
 
239
-		$result = $this->object->readf( 'file' );
239
+		$result = $this->object->readf('file');
240 240
 
241
-		$this->assertEquals( 'test', file_get_contents( $result ) );
241
+		$this->assertEquals('test', file_get_contents($result));
242 242
 
243
-		unlink( $result );
244
-		unlink( $file );
243
+		unlink($result);
244
+		unlink($file);
245 245
 	}
246 246
 
247 247
 
248 248
 	public function testReads()
249 249
 	{
250
-		$this->mock->expects( $this->once() )->method( 'readStream' )
251
-			->will( $this->returnValue( 1 ) );
250
+		$this->mock->expects($this->once())->method('readStream')
251
+			->will($this->returnValue(1));
252 252
 
253
-		$this->assertEquals( 1, $this->object->reads( 'test' ) );
253
+		$this->assertEquals(1, $this->object->reads('test'));
254 254
 	}
255 255
 
256 256
 
257 257
 	public function testReadsException()
258 258
 	{
259
-		$this->mock->expects( $this->once() )->method( 'readStream' )
260
-			->will( $this->returnValue( false ) );
259
+		$this->mock->expects($this->once())->method('readStream')
260
+			->will($this->returnValue(false));
261 261
 
262
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
263
-		$this->object->reads( 'test' );
262
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
263
+		$this->object->reads('test');
264 264
 	}
265 265
 
266 266
 
267 267
 	public function testReadsException2()
268 268
 	{
269
-		$this->mock->expects( $this->once() )->method( 'readStream' )
270
-			->will( $this->throwException( new \RuntimeException() ) );
269
+		$this->mock->expects($this->once())->method('readStream')
270
+			->will($this->throwException(new \RuntimeException()));
271 271
 
272
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
273
-		$this->object->reads( 'test' );
272
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
273
+		$this->object->reads('test');
274 274
 	}
275 275
 
276 276
 
277 277
 	public function testWrite()
278 278
 	{
279
-		$this->mock->expects( $this->once() )->method( 'put' )
280
-			->will( $this->returnValue( true ) );
279
+		$this->mock->expects($this->once())->method('put')
280
+			->will($this->returnValue(true));
281 281
 
282
-		$this->object->write( 'test', 'value' );
282
+		$this->object->write('test', 'value');
283 283
 	}
284 284
 
285 285
 
286 286
 	public function testWriteException()
287 287
 	{
288
-		$this->mock->expects( $this->once() )->method( 'put' )
289
-			->will( $this->returnValue( false ) );
288
+		$this->mock->expects($this->once())->method('put')
289
+			->will($this->returnValue(false));
290 290
 
291
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
292
-		$this->object->write( 'test', 'value' );
291
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
292
+		$this->object->write('test', 'value');
293 293
 	}
294 294
 
295 295
 
296 296
 	public function testWriteException2()
297 297
 	{
298
-		$this->mock->expects( $this->once() )->method( 'put' )
299
-			->will( $this->throwException( new \RuntimeException() ) );
298
+		$this->mock->expects($this->once())->method('put')
299
+			->will($this->throwException(new \RuntimeException()));
300 300
 
301
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
302
-		$this->object->write( 'test', 'value' );
301
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
302
+		$this->object->write('test', 'value');
303 303
 	}
304 304
 
305 305
 
306 306
 	public function testWritef()
307 307
 	{
308
-		$file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'flytest';
309
-		file_put_contents( $file, 'test' );
308
+		$file = sys_get_temp_dir().DIRECTORY_SEPARATOR.'flytest';
309
+		file_put_contents($file, 'test');
310 310
 
311
-		$this->mock->expects( $this->once() )->method( 'putStream' );
311
+		$this->mock->expects($this->once())->method('putStream');
312 312
 
313
-		$this->object->writef( 'file', $file );
313
+		$this->object->writef('file', $file);
314 314
 
315
-		unlink( $file );
315
+		unlink($file);
316 316
 	}
317 317
 
318 318
 
319 319
 	public function testWrites()
320 320
 	{
321
-		$this->mock->expects( $this->once() )->method( 'putStream' )
322
-			->will( $this->returnValue( true ) );
321
+		$this->mock->expects($this->once())->method('putStream')
322
+			->will($this->returnValue(true));
323 323
 
324
-		$this->object->writes( 'test', 1 );
324
+		$this->object->writes('test', 1);
325 325
 	}
326 326
 
327 327
 
328 328
 	public function testWritesException()
329 329
 	{
330
-		$this->mock->expects( $this->once() )->method( 'putStream' )
331
-			->will( $this->returnValue( false ) );
330
+		$this->mock->expects($this->once())->method('putStream')
331
+			->will($this->returnValue(false));
332 332
 
333
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
334
-		$this->object->writes( 'test', 2 );
333
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
334
+		$this->object->writes('test', 2);
335 335
 	}
336 336
 
337 337
 
338 338
 	public function testWritesException2()
339 339
 	{
340
-		$this->mock->expects( $this->once() )->method( 'putStream' )
341
-			->will( $this->throwException( new \RuntimeException() ) );
340
+		$this->mock->expects($this->once())->method('putStream')
341
+			->will($this->throwException(new \RuntimeException()));
342 342
 
343
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
344
-		$this->object->writes( 'test', null );
343
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
344
+		$this->object->writes('test', null);
345 345
 	}
346 346
 
347 347
 
348 348
 	public function testMove()
349 349
 	{
350
-		$this->mock->expects( $this->once() )->method( 'rename' )
351
-			->will( $this->returnValue( true ) );
350
+		$this->mock->expects($this->once())->method('rename')
351
+			->will($this->returnValue(true));
352 352
 
353
-		$this->object->move( 'file1', 'file2' );
353
+		$this->object->move('file1', 'file2');
354 354
 	}
355 355
 
356 356
 
357 357
 	public function testMoveException()
358 358
 	{
359
-		$this->mock->expects( $this->once() )->method( 'rename' )
360
-			->will( $this->returnValue( false ) );
359
+		$this->mock->expects($this->once())->method('rename')
360
+			->will($this->returnValue(false));
361 361
 
362
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
363
-		$this->object->move( 'file1', 'file2' );
362
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
363
+		$this->object->move('file1', 'file2');
364 364
 	}
365 365
 
366 366
 
367 367
 	public function testMoveException2()
368 368
 	{
369
-		$this->mock->expects( $this->once() )->method( 'rename' )
370
-			->will( $this->throwException( new \RuntimeException() ) );
369
+		$this->mock->expects($this->once())->method('rename')
370
+			->will($this->throwException(new \RuntimeException()));
371 371
 
372
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
373
-		$this->object->move( 'file1', 'file2' );
372
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
373
+		$this->object->move('file1', 'file2');
374 374
 	}
375 375
 
376 376
 
377 377
 	public function testCopy()
378 378
 	{
379
-		$this->mock->expects( $this->once() )->method( 'copy' )
380
-		->will( $this->returnValue( true ) );
379
+		$this->mock->expects($this->once())->method('copy')
380
+		->will($this->returnValue(true));
381 381
 
382
-		$this->object->copy( 'file1', 'file2' );
382
+		$this->object->copy('file1', 'file2');
383 383
 	}
384 384
 
385 385
 
386 386
 	public function testCopyException()
387 387
 	{
388
-		$this->mock->expects( $this->once() )->method( 'copy' )
389
-		->will( $this->returnValue( false ) );
388
+		$this->mock->expects($this->once())->method('copy')
389
+		->will($this->returnValue(false));
390 390
 
391
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
392
-		$this->object->copy( 'file1', 'file2' );
391
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
392
+		$this->object->copy('file1', 'file2');
393 393
 	}
394 394
 
395 395
 
396 396
 	public function testCopyException2()
397 397
 	{
398
-		$this->mock->expects( $this->once() )->method( 'copy' )
399
-		->will( $this->throwException( new \RuntimeException() ) );
398
+		$this->mock->expects($this->once())->method('copy')
399
+		->will($this->throwException(new \RuntimeException()));
400 400
 
401
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
402
-		$this->object->copy( 'file1', 'file2' );
401
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
402
+		$this->object->copy('file1', 'file2');
403 403
 	}
404 404
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyPhpcrTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,26 +7,26 @@  discard block
 block discarded – undo
7 7
 {
8 8
 	protected function setUp()
9 9
 	{
10
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem first' );
10
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
11
+			$this->markTestSkipped('Install Flysystem first');
12 12
 		}
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testGetProvider()
17 17
 	{
18
-		$object = new FlyPhpcr( [] );
19
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
18
+		$object = new FlyPhpcr([]);
19
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
20 20
 
21
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
22
-		$object->has( 'test' );
21
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
22
+		$object->has('test');
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testGetProviderRoot()
27 27
 	{
28
-		if( !class_exists( '\League\Flysystem\Phpcr\PhpcrAdapter' ) ) {
29
-			$this->markTestSkipped( 'Install Flysystem PHPCR adapter' );
28
+		if (!class_exists('\League\Flysystem\Phpcr\PhpcrAdapter')) {
29
+			$this->markTestSkipped('Install Flysystem PHPCR adapter');
30 30
 		}
31 31
 
32 32
 		$config = array(
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
 			'path' => '/tmp/fly_phpcr.db',
35 35
 			'root' => '/',
36 36
 		);
37
-		$object = new FlyPhpcr( $config );
38
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
37
+		$object = new FlyPhpcr($config);
38
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
39 39
 
40
-		$this->expectException( '\PHPCR\RepositoryException' );
41
-		$object->has( 'test' );
40
+		$this->expectException('\PHPCR\RepositoryException');
41
+		$object->has('test');
42 42
 	}
43 43
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyRackspaceTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,32 +7,32 @@
 block discarded – undo
7 7
 {
8 8
 	protected function setUp()
9 9
 	{
10
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem first' );
10
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
11
+			$this->markTestSkipped('Install Flysystem first');
12 12
 		}
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testGetProvider()
17 17
 	{
18
-		$object = new FlyRackspace( [] );
19
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
18
+		$object = new FlyRackspace([]);
19
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
20 20
 
21
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
22
-		$object->has( 'test' );
21
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
22
+		$object->has('test');
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testGetProviderContainer()
27 27
 	{
28
-		if( !class_exists( '\League\Flysystem\Rackspace\RackspaceAdapter' ) ) {
29
-			$this->markTestSkipped( 'Install Flysystem Rackspace adapter' );
28
+		if (!class_exists('\League\Flysystem\Rackspace\RackspaceAdapter')) {
29
+			$this->markTestSkipped('Install Flysystem Rackspace adapter');
30 30
 		}
31 31
 
32
-		$object = new FlyRackspace( array( 'container' => 'test' ) );
33
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
32
+		$object = new FlyRackspace(array('container' => 'test'));
33
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
34 34
 
35
-		$this->expectException( '\OpenCloud\Common\Exceptions\CredentialError' );
36
-		$object->has( 'test' );
35
+		$this->expectException('\OpenCloud\Common\Exceptions\CredentialError');
36
+		$object->has('test');
37 37
 	}
38 38
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyLocalTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,27 +7,27 @@
 block discarded – undo
7 7
 {
8 8
 	protected function setUp()
9 9
 	{
10
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem first' );
10
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
11
+			$this->markTestSkipped('Install Flysystem first');
12 12
 		}
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testGetProvider()
17 17
 	{
18
-		$object = new FlyLocal( array( 'basedir' => dirname( dirname( __DIR__ ) ) ) );
19
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
18
+		$object = new FlyLocal(array('basedir' => dirname(dirname(__DIR__))));
19
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
20 20
 
21
-		$object->has( 'test' );
21
+		$object->has('test');
22 22
 	}
23 23
 
24 24
 
25 25
 	public function testGetProviderNoBasedir()
26 26
 	{
27
-		$object = new FlyLocal( [] );
28
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
27
+		$object = new FlyLocal([]);
28
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
29 29
 
30
-		$this->expectException( 'Aimeos\MW\Filesystem\Exception' );
31
-		$object->has( 'test' );
30
+		$this->expectException('Aimeos\MW\Filesystem\Exception');
31
+		$object->has('test');
32 32
 	}
33 33
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyZipTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,35 +7,35 @@
 block discarded – undo
7 7
 {
8 8
 	protected function setUp()
9 9
 	{
10
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem first' );
10
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
11
+			$this->markTestSkipped('Install Flysystem first');
12 12
 		}
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testGetProvider()
17 17
 	{
18
-		if( !class_exists( '\League\Flysystem\ZipArchive\ZipArchiveAdapter' ) ) {
19
-			$this->markTestSkipped( 'Install Flysystem ZipArchive adapter' );
18
+		if (!class_exists('\League\Flysystem\ZipArchive\ZipArchiveAdapter')) {
19
+			$this->markTestSkipped('Install Flysystem ZipArchive adapter');
20 20
 		}
21 21
 
22
-		$object = new FlyZip( [] );
23
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
22
+		$object = new FlyZip([]);
23
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
24 24
 
25
-		$this->expectException( '\Aimeos\MW\Filesystem\Exception' );
26
-		$object->has( 'test' );
25
+		$this->expectException('\Aimeos\MW\Filesystem\Exception');
26
+		$object->has('test');
27 27
 	}
28 28
 
29 29
 
30 30
 	public function testGetProviderFilepath()
31 31
 	{
32
-		if( !class_exists( '\League\Flysystem\ZipArchive\ZipArchiveAdapter' ) ) {
33
-			$this->markTestSkipped( 'Install Flysystem ZipArchive adapter' );
32
+		if (!class_exists('\League\Flysystem\ZipArchive\ZipArchiveAdapter')) {
33
+			$this->markTestSkipped('Install Flysystem ZipArchive adapter');
34 34
 		}
35 35
 
36
-		$object = new FlyZip( array( 'filepath' => '/tmp/flytest.zip' ) );
37
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
36
+		$object = new FlyZip(array('filepath' => '/tmp/flytest.zip'));
37
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
38 38
 
39
-		$object->has( 'test' );
39
+		$object->has('test');
40 40
 	}
41 41
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyReplicateTest.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -7,27 +7,27 @@  discard block
 block discarded – undo
7 7
 {
8 8
 	protected function setUp()
9 9
 	{
10
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem first' );
10
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
11
+			$this->markTestSkipped('Install Flysystem first');
12 12
 		}
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testGetProvider()
17 17
 	{
18
-		if( !class_exists( '\League\Flysystem\Replicate\ReplicateAdapter' ) ) {
19
-			$this->markTestSkipped( 'Install Flysystem Replicate adapter' );
18
+		if (!class_exists('\League\Flysystem\Replicate\ReplicateAdapter')) {
19
+			$this->markTestSkipped('Install Flysystem Replicate adapter');
20 20
 		}
21 21
 
22 22
 		$config = array(
23 23
 			'adapter' => 'Replicate',
24
-			'source' => array( 'adapter' => 'FlyMemory' ),
25
-			'replica' => array( 'adapter' => 'FlyMemory' ),
24
+			'source' => array('adapter' => 'FlyMemory'),
25
+			'replica' => array('adapter' => 'FlyMemory'),
26 26
 		);
27
-		$object = new FlyReplicate( $config );
28
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
27
+		$object = new FlyReplicate($config);
28
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
29 29
 
30
-		$object->has( 'test' );
30
+		$object->has('test');
31 31
 	}
32 32
 
33 33
 
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
 		$config = array(
37 37
 			'adapter' => 'Replicate',
38 38
 		);
39
-		$object = new FlyReplicate( $config );
40
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
39
+		$object = new FlyReplicate($config);
40
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
41 41
 
42
-		$this->expectException( 'Aimeos\MW\Filesystem\Exception' );
43
-		$object->has( 'test' );
42
+		$this->expectException('Aimeos\MW\Filesystem\Exception');
43
+		$object->has('test');
44 44
 	}
45 45
 
46 46
 
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
 	{
49 49
 		$config = array(
50 50
 			'adapter' => 'Replicate',
51
-			'source' => array( 'adapter' => 'FlyMemory' ),
51
+			'source' => array('adapter' => 'FlyMemory'),
52 52
 		);
53
-		$object = new FlyReplicate( $config );
54
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
53
+		$object = new FlyReplicate($config);
54
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
55 55
 
56
-		$this->expectException( 'Aimeos\MW\Filesystem\Exception' );
57
-		$object->has( 'test' );
56
+		$this->expectException('Aimeos\MW\Filesystem\Exception');
57
+		$object->has('test');
58 58
 	}
59 59
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyGridfsTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,39 +7,39 @@
 block discarded – undo
7 7
 {
8 8
 	protected function setUp()
9 9
 	{
10
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem first' );
10
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
11
+			$this->markTestSkipped('Install Flysystem first');
12 12
 		}
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testGetProvider()
17 17
 	{
18
-		$object = new FlyGridfs( [] );
19
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
18
+		$object = new FlyGridfs([]);
19
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
20 20
 
21
-		$this->expectException( 'Aimeos\MW\Filesystem\Exception' );
22
-		$object->has( 'test' );
21
+		$this->expectException('Aimeos\MW\Filesystem\Exception');
22
+		$object->has('test');
23 23
 	}
24 24
 
25 25
 
26 26
 	public function testGetProviderToken()
27 27
 	{
28
-		if( !class_exists( '\League\Flysystem\GridFS\GridFSAdapter' ) ) {
29
-			$this->markTestSkipped( 'Install Flysystem GridFS adapter' );
28
+		if (!class_exists('\League\Flysystem\GridFS\GridFSAdapter')) {
29
+			$this->markTestSkipped('Install Flysystem GridFS adapter');
30 30
 		}
31 31
 
32
-		if( !class_exists( '\MongoClient' ) ) {
33
-			$this->markTestSkipped( 'Install Mongo client extension' );
32
+		if (!class_exists('\MongoClient')) {
33
+			$this->markTestSkipped('Install Mongo client extension');
34 34
 		}
35 35
 
36 36
 		$config = array(
37 37
 			'dbname' => 'test',
38 38
 		);
39
-		$object = new FlyGridfs( $config );
40
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
39
+		$object = new FlyGridfs($config);
40
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
41 41
 
42
-		$this->expectException( 'Aimeos\MW\Filesystem\Exception' );
43
-		$object->has( 'test' );
42
+		$this->expectException('Aimeos\MW\Filesystem\Exception');
43
+		$object->has('test');
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyWebdavTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,42 +7,42 @@
 block discarded – undo