Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
Use ::class notation
  • Loading branch information
mladenilic committed Jul 5, 2017
1 parent bb191d4 commit 03adb61
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,19 +456,20 @@ public function testAddedProductToQuoteIsSalable()
*/
public function testGetItemById()
{
$quote = Bootstrap::getObjectManager()->create('Magento\Quote\Model\Quote');
$objectManager = Bootstrap::getObjectManager();
$quote = $objectManager->create(\Magento\Quote\Model\Quote::class);
$quote->load('test01', 'reserved_order_id');

$quoteItem = Bootstrap::getObjectManager()->create('Magento\Quote\Model\Quote\Item');
$quoteItem = $objectManager->create(\Magento\Quote\Model\Quote\Item::class);

$productRepository = Bootstrap::getObjectManager()->create('Magento\Catalog\Api\ProductRepositoryInterface');
$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);
$product = $productRepository->get('simple');

$quoteItem->setProduct($product);
$quote->addItem($quoteItem);
$quote->save();

$this->assertInstanceOf('Magento\Quote\Model\Quote\Item', $quote->getItemById($quoteItem->getId()));
$this->assertInstanceOf(\Magento\Quote\Model\Quote\Item::class, $quote->getItemById($quoteItem->getId()));
$this->assertEquals($quoteItem->getId(), $quote->getItemById($quoteItem->getId())->getId());
}
}

0 comments on commit 03adb61

Please sign in to comment.