Code Duplication    Length = 16-16 lines in 2 locations

lib/custom/tests/MW/MQueue/AMQPTest.php 1 location

@@ 50-65 (lines=16) @@
47
	}
48
49
50
	public function testGetQueue()
51
	{
52
		$channel = $this->getMockBuilder( 'PhpAmqpLib\Channel\AMQPChannel' )
53
			->disableOriginalConstructor()
54
			->getMock();
55
56
		$object = $this->getMockBuilder( '\Aimeos\MW\MQueue\AMQP' )
57
			->setMethods( array( 'getChannel', '__destruct' ) )
58
			->disableOriginalConstructor()
59
			->getMock();
60
61
		$object->expects( $this->once() )->method( 'getChannel' )
62
			->will( $this->returnValue( $channel ) );
63
64
		$this->assertInstanceOf( '\Aimeos\MW\MQueue\Queue\Iface', $object->getQueue( 'test' ) );
65
	}
66
67
68
	public function testGetQueueException()

lib/custom/tests/MW/MQueue/StompTest.php 1 location

@@ 49-64 (lines=16) @@
46
	}
47
48
49
	public function testGetQueue()
50
	{
51
		$client = $this->getMockBuilder( '\Stomp' )
52
			->disableOriginalConstructor()
53
			->getMock();
54
55
		$object = $this->getMockBuilder( '\Aimeos\MW\MQueue\Stomp' )
56
			->setMethods( array( 'connect' ) )
57
			->disableOriginalConstructor()
58
			->getMock();
59
60
		$object->expects( $this->once() )->method( 'connect' )
61
			->will( $this->returnValue( $client ) );
62
63
		$this->assertInstanceOf( '\Aimeos\MW\MQueue\Queue\Iface', $object->getQueue( 'test' ) );
64
	}
65
}
66