Code Duplication    Length = 9-10 lines in 6 locations

lib/custom/tests/MW/Filesystem/LaravelTest.php 6 locations

@@ 122-130 (lines=9) @@
119
	}
120
121
122
	public function testSize()
123
	{
124
		$this->mock->expects( $this->once() )->method( 'size' )
125
			->will( $this->returnValue( 4 ) );
126
127
		$result = $this->object->size( 'test' );
128
129
		$this->assertEquals( 4, $result );
130
	}
131
132
133
	public function testSizeException()
@@ 143-151 (lines=9) @@
140
	}
141
142
143
	public function testTime()
144
	{
145
		$this->mock->expects( $this->once() )->method( 'lastModified' )
146
			->will( $this->returnValue( 1 ) );
147
148
		$result = $this->object->time( 'test' );
149
150
		$this->assertGreaterThan( 0, $result );
151
	}
152
153
154
	public function testTimeException()
@@ 182-190 (lines=9) @@
179
	}
180
181
182
	public function testHas()
183
	{
184
		$this->mock->expects( $this->once() )->method( 'exists' )
185
			->will( $this->returnValue( true ) );
186
187
		$result = $this->object->has( 'test' );
188
189
		$this->assertTrue( $result );
190
	}
191
192
193
	public function testHasFalse()
@@ 193-201 (lines=9) @@
190
	}
191
192
193
	public function testHasFalse()
194
	{
195
		$this->mock->expects( $this->once() )->method( 'exists' )
196
			->will( $this->returnValue( false ) );
197
198
		$result = $this->object->has( 'test' );
199
200
		$this->assertFalse( $result );
201
	}
202
203
204
	public function testRead()
@@ 204-212 (lines=9) @@
201
	}
202
203
204
	public function testRead()
205
	{
206
		$this->mock->expects( $this->once() )->method( 'get' )
207
			->will( $this->returnValue( 'test' ) );
208
209
		$result = $this->object->read( 'file' );
210
211
		$this->assertEquals( 'test', $result );
212
	}
213
214
215
	public function testReadException()
@@ 225-234 (lines=10) @@
222
	}
223
224
225
	public function testReadf()
226
	{
227
		$this->mock->expects( $this->once() )->method( 'get' )
228
			->will( $this->returnValue( 'test' ) );
229
230
		$result = $this->object->readf( 'file' );
231
232
		$this->assertEquals( 'test', file_get_contents( $result ) );
233
		unlink( $result );
234
	}
235
236
237
	public function testReads()