File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
dev/tests/integration/testsuite/Magento/Quote/Model Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -456,19 +456,20 @@ public function testAddedProductToQuoteIsSalable()
456
456
*/
457
457
public function testGetItemById ()
458
458
{
459
- $ quote = Bootstrap::getObjectManager ()->create ('Magento\Quote\Model\Quote ' );
459
+ $ objectManager = Bootstrap::getObjectManager ();
460
+ $ quote = $ objectManager ->create (\Magento \Quote \Model \Quote::class);
460
461
$ quote ->load ('test01 ' , 'reserved_order_id ' );
461
462
462
- $ quoteItem = Bootstrap:: getObjectManager () ->create (' Magento\Quote\Model\Quote\Item ' );
463
+ $ quoteItem = $ objectManager ->create (\ Magento \Quote \Model \Quote \Item::class );
463
464
464
- $ productRepository = Bootstrap:: getObjectManager () ->create (' Magento\Catalog\Api\ProductRepositoryInterface ' );
465
+ $ productRepository = $ objectManager ->create (\ Magento \Catalog \Api \ProductRepositoryInterface::class );
465
466
$ product = $ productRepository ->get ('simple ' );
466
467
467
468
$ quoteItem ->setProduct ($ product );
468
469
$ quote ->addItem ($ quoteItem );
469
470
$ quote ->save ();
470
471
471
- $ this ->assertInstanceOf (' Magento\Quote\Model\Quote\Item ' , $ quote ->getItemById ($ quoteItem ->getId ()));
472
+ $ this ->assertInstanceOf (\ Magento \Quote \Model \Quote \Item::class , $ quote ->getItemById ($ quoteItem ->getId ()));
472
473
$ this ->assertEquals ($ quoteItem ->getId (), $ quote ->getItemById ($ quoteItem ->getId ())->getId ());
473
474
}
474
475
}
You can’t perform that action at this time.
0 commit comments