/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
dev/tests/integration/testsuite/Magento/Quote/Model/MaskedQuoteIdToQuoteIdTest.php
46 строк
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 10:44
22 окт 2025, 10:44
264bea2
Код
Авторство
О чём код?
<?php /** * Copyright 2018 Adobe * All Rights Reserved. */ declare(strict_types=1); namespace Magento\Quote\Model; use Magento\TestFramework\Helper\Bootstrap as BootstrapHelper; use Magento\Quote\Api\GuestCartManagementInterface; class MaskedQuoteIdToQuoteIdTest extends \PHPUnit\Framework\TestCase { /** * @var MaskedQuoteIdToQuoteIdInterface */ private $maskedQuoteIdToQuoteId; /** * @var GuestCartManagementInterface */ private $guestCartManagement; protected function setUp(): void { $objectManager = BootstrapHelper::getObjectManager(); $this->maskedQuoteIdToQuoteId = $objectManager->create(MaskedQuoteIdToQuoteIdInterface::class); $this->guestCartManagement = $objectManager->create(GuestCartManagementInterface::class); } public function testMaskedIdToQuoteId() { $maskedQuoteId = $this->guestCartManagement->createEmptyCart(); $quoteId = $this->maskedQuoteIdToQuoteId->execute($maskedQuoteId); self::assertGreaterThan(0, $quoteId); } public function testMaskedQuoteIdToQuoteIdForNonExistentQuote() { self::expectException(\Magento\Framework\Exception\NoSuchEntityException::class); $this->maskedQuoteIdToQuoteId->execute('test'); } }