Completed
Push — master ( 480ec4...0e1d59 )
by Aimeos
02:44
created
lib/custom/tests/MW/Filesystem/FlyFtpTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 {
8 8
 	public function testGetProvider()
9 9
 	{
10
-		$object = new FlyFtp( array( 'host' => 'ftp.kernel.org' ) );
11
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
10
+		$object = new FlyFtp(array('host' => 'ftp.kernel.org'));
11
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
12 12
 
13
-		$object->has( 'test' );
13
+		$object->has('test');
14 14
 	}
15 15
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyGridfsTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,31 +7,31 @@
 block discarded – undo
7 7
 {
8 8
 	public function testGetProvider()
9 9
 	{
10
-		$object = new FlyGridfs( array() );
11
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
10
+		$object = new FlyGridfs(array());
11
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
12 12
 
13
-		$this->setExpectedException( 'Aimeos\MW\Filesystem\Exception' );
14
-		$object->has( 'test' );
13
+		$this->setExpectedException('Aimeos\MW\Filesystem\Exception');
14
+		$object->has('test');
15 15
 	}
16 16
 
17 17
 
18 18
 	public function testGetProviderToken()
19 19
 	{
20
-		if( !class_exists( '\League\Flysystem\GridFS\GridFSAdapter' ) ) {
21
-			$this->markTestSkipped( 'Install Flysystem GridFS adapter' );
20
+		if (!class_exists('\League\Flysystem\GridFS\GridFSAdapter')) {
21
+			$this->markTestSkipped('Install Flysystem GridFS adapter');
22 22
 		}
23 23
 
24
-		if( !class_exists( '\MongoClient' ) ) {
25
-			$this->markTestSkipped( 'Install Mongo client extension' );
24
+		if (!class_exists('\MongoClient')) {
25
+			$this->markTestSkipped('Install Mongo client extension');
26 26
 		}
27 27
 
28 28
 		$config = array(
29 29
 			'dbname' => 'test',
30 30
 		);
31
-		$object = new FlyGridfs( $config );
32
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
31
+		$object = new FlyGridfs($config);
32
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
33 33
 
34
-		$this->setExpectedException( 'Aimeos\MW\Filesystem\Exception' );
35
-		$object->has( 'test' );
34
+		$this->setExpectedException('Aimeos\MW\Filesystem\Exception');
35
+		$object->has('test');
36 36
 	}
37 37
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyMemoryTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 {
8 8
 	public function testGetProvider()
9 9
 	{
10
-		if( !class_exists( '\League\Flysystem\Memory\MemoryAdapter' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem memory adapter' );
10
+		if (!class_exists('\League\Flysystem\Memory\MemoryAdapter')) {
11
+			$this->markTestSkipped('Install Flysystem memory adapter');
12 12
 		}
13 13
 
14
-		$object = new FlyMemory( array() );
15
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
14
+		$object = new FlyMemory(array());
15
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
16 16
 
17
-		$object->has( 'test' );
17
+		$object->has('test');
18 18
 	}
19 19
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyNoneTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 {
8 8
 	public function testGetProvider()
9 9
 	{
10
-		$object = new FlyNone( array() );
11
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
10
+		$object = new FlyNone(array());
11
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
12 12
 
13
-		$object->has( 'test' );
13
+		$object->has('test');
14 14
 	}
15 15
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyPhpcrTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
 {
8 8
 	public function testGetProvider()
9 9
 	{
10
-		$object = new FlyPhpcr( array() );
11
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
10
+		$object = new FlyPhpcr(array());
11
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
12 12
 
13
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
14
-		$object->has( 'test' );
13
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
14
+		$object->has('test');
15 15
 	}
16 16
 
17 17
 
18 18
 	public function testGetProviderRoot()
19 19
 	{
20
-		if( !class_exists( '\League\Flysystem\Phpcr\PhpcrAdapter' ) ) {
21
-			$this->markTestSkipped( 'Install Flysystem PHPCR adapter' );
20
+		if (!class_exists('\League\Flysystem\Phpcr\PhpcrAdapter')) {
21
+			$this->markTestSkipped('Install Flysystem PHPCR adapter');
22 22
 		}
23 23
 
24 24
 		$config = array(
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 			'path' => '/tmp/fly_phpcr.db',
27 27
 			'root' => '/',
28 28
 		);
29
-		$object = new FlyPhpcr( $config );
30
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
29
+		$object = new FlyPhpcr($config);
30
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
31 31
 
32
-		$this->setExpectedException( '\PHPCR\RepositoryException' );
33
-		$object->has( 'test' );
32
+		$this->setExpectedException('\PHPCR\RepositoryException');
33
+		$object->has('test');
34 34
 	}
35 35
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyRackspaceTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
 {
8 8
 	public function testGetProvider()
9 9
 	{
10
-		$object = new FlyRackspace( array() );
11
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
10
+		$object = new FlyRackspace(array());
11
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
12 12
 
13
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
14
-		$object->has( 'test' );
13
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
14
+		$object->has('test');
15 15
 	}
16 16
 
17 17
 
18 18
 	public function testGetProviderContainer()
19 19
 	{
20
-		if( !class_exists( '\League\Flysystem\Rackspace\RackspaceAdapter' ) ) {
21
-			$this->markTestSkipped( 'Install Flysystem Rackspace adapter' );
20
+		if (!class_exists('\League\Flysystem\Rackspace\RackspaceAdapter')) {
21
+			$this->markTestSkipped('Install Flysystem Rackspace adapter');
22 22
 		}
23 23
 
24
-		$object = new FlyRackspace( array( 'container' => 'test' ) );
25
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
24
+		$object = new FlyRackspace(array('container' => 'test'));
25
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
26 26
 
27
-		$this->setExpectedException( '\OpenCloud\Common\Exceptions\CredentialError' );
28
-		$object->has( 'test' );
27
+		$this->setExpectedException('\OpenCloud\Common\Exceptions\CredentialError');
28
+		$object->has('test');
29 29
 	}
30 30
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlySftpTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 {
8 8
 	public function testGetProvider()
9 9
 	{
10
-		if( !class_exists( '\League\Flysystem\Sftp\SftpAdapter' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem SFTP adapter' );
10
+		if (!class_exists('\League\Flysystem\Sftp\SftpAdapter')) {
11
+			$this->markTestSkipped('Install Flysystem SFTP adapter');
12 12
 		}
13 13
 
14
-		$object = new FlySftp( array( 'host' => 'test.rebex.net', 'username' => 'demo', 'password' => 'password' ) );
15
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
14
+		$object = new FlySftp(array('host' => 'test.rebex.net', 'username' => 'demo', 'password' => 'password'));
15
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
16 16
 
17
-		$object->has( 'test' );
17
+		$object->has('test');
18 18
 	}
19 19
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyTest.php 1 patch
Spacing   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -11,364 +11,364 @@
 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->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
71
-		$this->object->mkdir( 'test' );
70
+		$this->setExpectedException('\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->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
90
-		$this->object->rmdir( 'test' );
89
+		$this->setExpectedException('\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->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
118
-		$this->object->size( 'test' );
117
+		$this->setExpectedException('\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 \Exception() ) );
124
+		$this->mock->expects($this->once())->method('getSize')
125
+		->will($this->throwException(new \Exception()));
126 126
 
127
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
128
-		$this->object->size( 'test' );
127
+		$this->setExpectedException('\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->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
147
-		$this->object->time( 'test' );
146
+		$this->setExpectedException('\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 \Exception() ) );
153
+		$this->mock->expects($this->once())->method('getTimestamp')
154
+			->will($this->throwException(new \Exception()));
155 155
 
156
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
157
-		$this->object->time( 'test' );
156
+		$this->setExpectedException('\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 \Exception() ) );
172
+		$this->mock->expects($this->once())->method('delete')
173
+		->will($this->throwException(new \Exception()));
174 174
 
175
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
176
-		$this->object->rm( 'test' );
175
+		$this->setExpectedException('\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->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
217
-		$this->object->read( 'test' );
216
+		$this->setExpectedException('\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 \Exception() ) );
223
+		$this->mock->expects($this->once())->method('read')
224
+			->will($this->throwException(new \Exception()));
225 225
 
226
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
227
-		$this->object->read( 'test' );
226
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
227
+		$this->object->read('test');
228 228
 	}
229 229
 
230 230
 
231 231
 	public function testReads()
232 232
 	{
233
-		$this->mock->expects( $this->once() )->method( 'readStream' )
234
-			->will( $this->returnValue( 1 ) );
233
+		$this->mock->expects($this->once())->method('readStream')
234
+			->will($this->returnValue(1));
235 235
 
236
-		$this->assertEquals( 1, $this->object->reads( 'test' ) );
236
+		$this->assertEquals(1, $this->object->reads('test'));
237 237
 	}
238 238
 
239 239
 
240 240
 	public function testReadsException()
241 241
 	{
242
-		$this->mock->expects( $this->once() )->method( 'readStream' )
243
-			->will( $this->returnValue( false ) );
242
+		$this->mock->expects($this->once())->method('readStream')
243
+			->will($this->returnValue(false));
244 244
 
245
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
246
-		$this->object->reads( 'test' );
245
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
246
+		$this->object->reads('test');
247 247
 	}
248 248
 
249 249
 
250 250
 	public function testReadsException2()
251 251
 	{
252
-		$this->mock->expects( $this->once() )->method( 'readStream' )
253
-			->will( $this->throwException( new \Exception() ) );
252
+		$this->mock->expects($this->once())->method('readStream')
253
+			->will($this->throwException(new \Exception()));
254 254
 
255
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
256
-		$this->object->reads( 'test' );
255
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
256
+		$this->object->reads('test');
257 257
 	}
258 258
 
259 259
 
260 260
 	public function testWrite()
261 261
 	{
262
-		$this->mock->expects( $this->once() )->method( 'put' )
263
-			->will( $this->returnValue( true ) );
262
+		$this->mock->expects($this->once())->method('put')
263
+			->will($this->returnValue(true));
264 264
 
265
-		$this->object->write( 'test', 'value' );
265
+		$this->object->write('test', 'value');
266 266
 	}
267 267
 
268 268
 
269 269
 	public function testWriteException()
270 270
 	{
271
-		$this->mock->expects( $this->once() )->method( 'put' )
272
-			->will( $this->returnValue( false ) );
271
+		$this->mock->expects($this->once())->method('put')
272
+			->will($this->returnValue(false));
273 273
 
274
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
275
-		$this->object->write( 'test', 'value' );
274
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
275
+		$this->object->write('test', 'value');
276 276
 	}
277 277
 
278 278
 
279 279
 	public function testWriteException2()
280 280
 	{
281
-		$this->mock->expects( $this->once() )->method( 'put' )
282
-			->will( $this->throwException( new \Exception() ) );
281
+		$this->mock->expects($this->once())->method('put')
282
+			->will($this->throwException(new \Exception()));
283 283
 
284
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
285
-		$this->object->write( 'test', 'value' );
284
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
285
+		$this->object->write('test', 'value');
286 286
 	}
287 287
 
288 288
 
289 289
 	public function testWrites()
290 290
 	{
291
-		$this->mock->expects( $this->once() )->method( 'putStream' )
292
-			->will( $this->returnValue( true ) );
291
+		$this->mock->expects($this->once())->method('putStream')
292
+			->will($this->returnValue(true));
293 293
 
294
-		$this->object->writes( 'test', 1 );
294
+		$this->object->writes('test', 1);
295 295
 	}
296 296
 
297 297
 
298 298
 	public function testWritesException()
299 299
 	{
300
-		$this->mock->expects( $this->once() )->method( 'putStream' )
301
-			->will( $this->returnValue( false ) );
300
+		$this->mock->expects($this->once())->method('putStream')
301
+			->will($this->returnValue(false));
302 302
 
303
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
304
-		$this->object->writes( 'test', 2 );
303
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
304
+		$this->object->writes('test', 2);
305 305
 	}
306 306
 
307 307
 
308 308
 	public function testWritesException2()
309 309
 	{
310
-		$this->mock->expects( $this->once() )->method( 'putStream' )
311
-			->will( $this->throwException( new \Exception() ) );
310
+		$this->mock->expects($this->once())->method('putStream')
311
+			->will($this->throwException(new \Exception()));
312 312
 
313
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
314
-		$this->object->writes( 'test', null );
313
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
314
+		$this->object->writes('test', null);
315 315
 	}
316 316
 
317 317
 
318 318
 	public function testMove()
319 319
 	{
320
-		$this->mock->expects( $this->once() )->method( 'rename' )
321
-			->will( $this->returnValue( true ) );
320
+		$this->mock->expects($this->once())->method('rename')
321
+			->will($this->returnValue(true));
322 322
 
323
-		$this->object->move( 'file1', 'file2' );
323
+		$this->object->move('file1', 'file2');
324 324
 	}
325 325
 
326 326
 
327 327
 	public function testMoveException()
328 328
 	{
329
-		$this->mock->expects( $this->once() )->method( 'rename' )
330
-			->will( $this->returnValue( false ) );
329
+		$this->mock->expects($this->once())->method('rename')
330
+			->will($this->returnValue(false));
331 331
 
332
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
333
-		$this->object->move( 'file1', 'file2' );
332
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
333
+		$this->object->move('file1', 'file2');
334 334
 	}
335 335
 
336 336
 
337 337
 	public function testMoveException2()
338 338
 	{
339
-		$this->mock->expects( $this->once() )->method( 'rename' )
340
-			->will( $this->throwException( new \Exception() ) );
339
+		$this->mock->expects($this->once())->method('rename')
340
+			->will($this->throwException(new \Exception()));
341 341
 
342
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
343
-		$this->object->move( 'file1', 'file2' );
342
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
343
+		$this->object->move('file1', 'file2');
344 344
 	}
345 345
 
346 346
 
347 347
 	public function testCopy()
348 348
 	{
349
-		$this->mock->expects( $this->once() )->method( 'copy' )
350
-		->will( $this->returnValue( true ) );
349
+		$this->mock->expects($this->once())->method('copy')
350
+		->will($this->returnValue(true));
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->returnValue( false ) );
358
+		$this->mock->expects($this->once())->method('copy')
359
+		->will($this->returnValue(false));
360 360
 
361
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
362
-		$this->object->copy( 'file1', 'file2' );
361
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
362
+		$this->object->copy('file1', 'file2');
363 363
 	}
364 364
 
365 365
 
366 366
 	public function testCopyException2()
367 367
 	{
368
-		$this->mock->expects( $this->once() )->method( 'copy' )
369
-		->will( $this->throwException( new \Exception() ) );
368
+		$this->mock->expects($this->once())->method('copy')
369
+		->will($this->throwException(new \Exception()));
370 370
 
371
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
372
-		$this->object->copy( 'file1', 'file2' );
371
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
372
+		$this->object->copy('file1', 'file2');
373 373
 	}
374 374
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyZipTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,27 +7,27 @@
 block discarded – undo
7 7
 {
8 8
 	public function testGetProvider()
9 9
 	{
10
-		if( !class_exists( '\League\Flysystem\ZipArchive\ZipArchiveAdapter' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem ZipArchive adapter' );
10
+		if (!class_exists('\League\Flysystem\ZipArchive\ZipArchiveAdapter')) {
11
+			$this->markTestSkipped('Install Flysystem ZipArchive adapter');
12 12
 		}
13 13
 
14
-		$object = new FlyZip( array() );
15
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
14
+		$object = new FlyZip(array());
15
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
16 16
 
17
-		$this->setExpectedException( '\Aimeos\MW\Filesystem\Exception' );
18
-		$object->has( 'test' );
17
+		$this->setExpectedException('\Aimeos\MW\Filesystem\Exception');
18
+		$object->has('test');
19 19
 	}
20 20
 
21 21
 
22 22
 	public function testGetProviderFilepath()
23 23
 	{
24
-		if( !class_exists( '\League\Flysystem\ZipArchive\ZipArchiveAdapter' ) ) {
25
-			$this->markTestSkipped( 'Install Flysystem ZipArchive adapter' );
24
+		if (!class_exists('\League\Flysystem\ZipArchive\ZipArchiveAdapter')) {
25
+			$this->markTestSkipped('Install Flysystem ZipArchive adapter');
26 26
 		}
27 27
 
28
-		$object = new FlyZip( array( 'filepath' => '/tmp/flytest.zip' ) );
29
-		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
28
+		$object = new FlyZip(array('filepath' => '/tmp/flytest.zip'));
29
+		$this->assertInstanceof('\Aimeos\MW\Filesystem\Iface', $object);
30 30
 
31
-		$object->has( 'test' );
31
+		$object->has('test');
32 32
 	}
33 33
 }
Please login to merge, or discard this patch.