Code Duplication    Length = 9-12 lines in 4 locations

lib/custom/tests/MW/Filesystem/LaravelTest.php 1 location

@@ 12-23 (lines=12) @@
9
	private $object;
10
11
12
	protected function setUp()
13
	{
14
		if( !interface_exists( '\\Illuminate\\Contracts\\Filesystem\\Filesystem' ) ) {
15
			$this->markTestSkipped( 'Install Laravel framework first' );
16
		}
17
18
		$this->mock = $this->getMockBuilder( '\\Illuminate\\Contracts\\Filesystem\\Filesystem' )
19
			->disableOriginalConstructor()
20
			->getMock();
21
22
		$this->object = new \Aimeos\MW\Filesystem\Laravel( $this->mock, sys_get_temp_dir() );
23
	}
24
25
26
	protected function tearDown()

lib/custom/tests/MW/Logger/Laravel5Test.php 1 location

@@ 21-29 (lines=9) @@
18
	 *
19
	 * @access protected
20
	 */
21
	protected function setUp()
22
	{
23
		if( interface_exists( '\\Illuminate\\Contracts\\Logging\\Log' ) === false ) {
24
			$this->markTestSkipped( 'Class \\Illuminate\\Contracts\\Logging\\Log not found' );
25
		}
26
27
		$this->mock = $this->getMockBuilder( '\\Illuminate\\Contracts\\Logging\\Log' )->getMock();
28
		$this->object = new \Aimeos\MW\Logger\Laravel5( $this->mock );
29
	}
30
31
32
	/**

lib/custom/tests/MW/Session/Laravel5Test.php 1 location

@@ 22-30 (lines=9) @@
19
	 *
20
	 * @access protected
21
	 */
22
	protected function setUp()
23
	{
24
		if( interface_exists( '\\Illuminate\\Session\\SessionInterface' ) === false ) {
25
			$this->markTestSkipped( 'Class \\Illuminate\\Session\\SessionInterface not found' );
26
		}
27
28
		$this->mock = $this->getMockBuilder( '\\Illuminate\\Session\\SessionInterface' )->getMock();
29
		$this->object = new \Aimeos\MW\Session\Laravel5( $this->mock );
30
	}
31
32
33
	/**

lib/custom/tests/MW/Cache/Laravel5Test.php 1 location

@@ 18-26 (lines=9) @@
15
	private $mock;
16
17
18
	protected function setUp()
19
	{
20
		if( interface_exists( '\\Illuminate\\Contracts\\Cache\\Store' ) === false ) {
21
			$this->markTestSkipped( 'Class \\Illuminate\\Contracts\\Cache\\Store not found' );
22
		}
23
24
		$this->mock = $this->getMockBuilder( '\\Illuminate\\Contracts\\Cache\\Store' )->getMock();
25
		$this->object = new \Aimeos\MW\Cache\Laravel5( $this->mock );
26
	}
27
28
29
	protected function tearDown()