SharedTest.php 762 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Wishlist\Controller;
  7. class SharedTest extends \Magento\TestFramework\TestCase\AbstractController
  8. {
  9. /**
  10. * @magentoDataFixture Magento/Wishlist/_files/wishlist_shared.php
  11. * @return void
  12. */
  13. public function testAllcartAction()
  14. {
  15. $this->getRequest()->setParam('code', 'fixture_unique_code');
  16. $this->dispatch('wishlist/shared/allcart');
  17. /** @var \Magento\Checkout\Model\Cart $cart */
  18. $cart = $this->_objectManager->get(\Magento\Checkout\Model\Cart::class);
  19. $quoteCount = $cart->getQuote()->getItemsCollection()->count();
  20. $this->assertEquals(1, $quoteCount);
  21. }
  22. }