Code Duplication    Length = 16-16 lines in 2 locations

controller/frontend/tests/Controller/Frontend/Basket/StandardTest.php 1 location

@@ 472-487 (lines=16) @@
469
	}
470
471
472
	public function testAddProductSelectionWithPricelessItem()
473
	{
474
		$this->object->addProduct( $this->testItem->getId(), 1 );
475
476
		$productManager = \Aimeos\MShop\Product\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
477
		$search = $productManager->createSearch();
478
479
		$search->setConditions( $search->compare( '==', 'product.code', 'U:TESTPSUB01' ) );
480
		$items = $productManager->searchItems( $search );
481
482
		if( ( $item = reset( $items ) ) === false ) {
483
			throw new \Exception( 'Product not found' );
484
		}
485
486
		$this->assertEquals( 'U:TESTPSUB01', $this->object->get()->getProduct( 0 )->getProductCode() );
487
	}
488
489
490
	public function testAddProductLowQuantityPriceException()

controller/frontend/tests/Controller/Frontend/Service/StandardTest.php 1 location

@@ 109-124 (lines=16) @@
106
	}
107
108
109
	public function testGetServicePriceCache()
110
	{
111
		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
112
		$basket = $orderManager->getSubManager( 'base' )->createItem();
113
114
		$services = $this->object->getServices( 'delivery', $basket );
115
116
		if( ( $service = reset( $services ) ) === false ) {
117
			throw new \Exception( 'No service item found' );
118
		}
119
120
		$price = $this->object->getServicePrice( 'delivery', $service->getId(), $basket );
121
122
		$this->assertEquals( '12.95', $price->getValue() );
123
		$this->assertEquals( '1.99', $price->getCosts() );
124
	}
125
126
127
	public function testGetServicePriceNoItems()