Code Duplication    Length = 9-10 lines in 6 locations

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

@@ 86-94 (lines=9) @@
83
	}
84
85
86
	public function testSize()
87
	{
88
		$this->mock->expects( $this->once() )->method( 'size' )
89
			->will( $this->returnValue( 4 ) );
90
91
		$result = $this->object->size( 'test' );
92
93
		$this->assertEquals( 4, $result );
94
	}
95
96
97
	public function testTime()
@@ 97-105 (lines=9) @@
94
	}
95
96
97
	public function testTime()
98
	{
99
		$this->mock->expects( $this->once() )->method( 'lastModified' )
100
			->will( $this->returnValue( 1 ) );
101
102
		$result = $this->object->time( 'test' );
103
104
		$this->assertGreaterThan( 0, $result );
105
	}
106
107
108
	public function testRm()
@@ 116-124 (lines=9) @@
113
	}
114
115
116
	public function testHas()
117
	{
118
		$this->mock->expects( $this->once() )->method( 'exists' )
119
			->will( $this->returnValue( true ) );
120
121
		$result = $this->object->has( 'test' );
122
123
		$this->assertTrue( $result );
124
	}
125
126
127
	public function testHasFalse()
@@ 127-135 (lines=9) @@
124
	}
125
126
127
	public function testHasFalse()
128
	{
129
		$this->mock->expects( $this->once() )->method( 'exists' )
130
			->will( $this->returnValue( false ) );
131
132
		$result = $this->object->has( 'test' );
133
134
		$this->assertFalse( $result );
135
	}
136
137
138
	public function testRead()
@@ 138-146 (lines=9) @@
135
	}
136
137
138
	public function testRead()
139
	{
140
		$this->mock->expects( $this->once() )->method( 'get' )
141
			->will( $this->returnValue( 'test' ) );
142
143
		$result = $this->object->read( 'file' );
144
145
		$this->assertEquals( 'test', $result );
146
	}
147
148
149
	public function testReadException()
@@ 159-168 (lines=10) @@
156
	}
157
158
159
	public function testReadf()
160
	{
161
		$this->mock->expects( $this->once() )->method( 'get' )
162
			->will( $this->returnValue( 'test' ) );
163
164
		$result = $this->object->readf( 'file' );
165
166
		$this->assertEquals( 'test', file_get_contents( $result ) );
167
		unlink( $result );
168
	}
169
170
171
	public function testReads()