@@ -394,7 +394,7 @@ public function testReorderItems(bool $loggedIn, string $request)
394
394
$ customerSession = $ this ->_objectManager ->get (CustomerSession::class);
395
395
$ customerSession ->logout ();
396
396
397
- $ checkoutSession = Bootstrap::getObjectManager ()->get (Session ::class);
397
+ $ checkoutSession = Bootstrap::getObjectManager ()->get (CheckoutSession ::class);
398
398
$ expected = [];
399
399
if ($ loggedIn && $ request == Request::METHOD_POST ) {
400
400
$ customer = $ this ->_objectManager ->create (CustomerRepository::class)->get ('customer2@example.com ' );
@@ -529,16 +529,16 @@ public function testUpdatePostActionWithMultipleProducts()
529
529
530
530
$ response = $ this ->updatePostRequest ($ quote , $ item1 , $ item2 , $ updatedQuantity , $ updatedQuantity , true );
531
531
532
- $ this ->assertContains (
533
- '[{"error":"There are no source items with the in stock status", "itemId": ' .$ item1 ->getId ().'}] ' ,
534
- $ response
532
+ $ this ->assertStringContainsString (
533
+ '"itemId": ' .$ item1 ->getId ().'}] ' ,
534
+ $ response[ ' error_message ' ]
535
535
);
536
536
537
537
$ response = $ this ->updatePostRequest ($ quote , $ item1 , $ item2 , $ originalQuantity , $ updatedQuantity , false );
538
538
539
- $ this ->assertContains (
540
- '[{"error":"There are no source items with the in stock status", "itemId": ' .$ item1 ->getId ().'}] ' ,
541
- $ response
539
+ $ this ->assertStringContainsString (
540
+ '"itemId": ' .$ item1 ->getId ().'}] ' ,
541
+ $ response[ ' error_message ' ]
542
542
);
543
543
$ this ->assertEquals (
544
544
$ originalQuantity + $ updatedQuantity ,
@@ -548,9 +548,9 @@ public function testUpdatePostActionWithMultipleProducts()
548
548
549
549
$ response = $ this ->updatePostRequest ($ quote , $ item1 , $ item2 , $ updatedQuantity , $ updatedQuantity , false );
550
550
551
- $ this ->assertContains (
552
- '[{"error":"There are no source items with the in stock status", "itemId": ' .$ item1 ->getId ().'}] ' ,
553
- $ response
551
+ $ this ->assertStringContainsString (
552
+ '"itemId": ' .$ item1 ->getId ().'}] ' ,
553
+ $ response[ ' error_message ' ]
554
554
);
555
555
$ this ->assertEquals (
556
556
$ originalQuantity + $ updatedQuantity ,
0 commit comments