|
11 | 11 | * LICENSE file that was distributed with this source code. |
12 | 12 | */ |
13 | 13 |
|
14 | | -use Extcode\Cart\Configuration\Loader\CurrencyTranslationLoader; |
15 | | -use Extcode\Cart\Configuration\Loader\CurrencyTranslationLoaderInterface; |
16 | 14 | use Extcode\Cart\Domain\Model\Cart\Cart; |
17 | 15 | use Extcode\Cart\Domain\Model\Cart\CartCouponFix; |
18 | 16 | use Extcode\Cart\Domain\Model\Cart\ProductFactory; |
19 | 17 | use Extcode\Cart\Domain\Model\Cart\ProductFactoryInterface; |
20 | 18 | use Extcode\Cart\Domain\Model\Cart\TaxClass; |
| 19 | +use Extcode\Cart\Service\CurrencyTranslationService; |
| 20 | +use Extcode\Cart\Service\CurrencyTranslationServiceInterface; |
21 | 21 | use LogicException; |
22 | 22 | use PHPUnit\Framework\Attributes\CoversClass; |
23 | 23 | use PHPUnit\Framework\Attributes\Test; |
@@ -1315,8 +1315,8 @@ public function getSubtotalGrossReturnsSubtotalGross(): void |
1315 | 1315 | $couponGross = 10.00; |
1316 | 1316 |
|
1317 | 1317 | GeneralUtility::addInstance( |
1318 | | - CurrencyTranslationLoaderInterface::class, |
1319 | | - new CurrencyTranslationLoader() |
| 1318 | + CurrencyTranslationServiceInterface::class, |
| 1319 | + new CurrencyTranslationService() |
1320 | 1320 | ); |
1321 | 1321 | $cart = $this->getMockBuilder(Cart::class) |
1322 | 1322 | ->onlyMethods(['getCouponGross', 'getCurrencyTranslation']) |
@@ -1353,8 +1353,8 @@ public function getSubtotalNetReturnsSubtotalNet(): void |
1353 | 1353 | $couponNet = $couponGross / 1.19; |
1354 | 1354 |
|
1355 | 1355 | GeneralUtility::addInstance( |
1356 | | - CurrencyTranslationLoaderInterface::class, |
1357 | | - new CurrencyTranslationLoader() |
| 1356 | + CurrencyTranslationServiceInterface::class, |
| 1357 | + new CurrencyTranslationService() |
1358 | 1358 | ); |
1359 | 1359 | $cart = $this->getMockBuilder(Cart::class) |
1360 | 1360 | ->onlyMethods(['getCouponNet', 'getCurrencyTranslation']) |
@@ -1402,8 +1402,8 @@ public function getCurrencyCodeInitiallyReturnsString(): void |
1402 | 1402 | public function constructorSetsCurrencyCode(): void |
1403 | 1403 | { |
1404 | 1404 | GeneralUtility::addInstance( |
1405 | | - CurrencyTranslationLoaderInterface::class, |
1406 | | - new CurrencyTranslationLoader() |
| 1405 | + CurrencyTranslationServiceInterface::class, |
| 1406 | + new CurrencyTranslationService() |
1407 | 1407 | ); |
1408 | 1408 | $cart = new Cart( |
1409 | 1409 | $this->taxClasses, |
@@ -1455,8 +1455,8 @@ public function getCurrencySignInitiallyReturnsString(): void |
1455 | 1455 | public function constructorSetsCurrencySign(): void |
1456 | 1456 | { |
1457 | 1457 | GeneralUtility::addInstance( |
1458 | | - CurrencyTranslationLoaderInterface::class, |
1459 | | - new CurrencyTranslationLoader() |
| 1458 | + CurrencyTranslationServiceInterface::class, |
| 1459 | + new CurrencyTranslationService() |
1460 | 1460 | ); |
1461 | 1461 | $cart = new Cart( |
1462 | 1462 | $this->taxClasses, |
@@ -1508,8 +1508,8 @@ public function getCurrencyTranslationInitiallyReturnsFloat(): void |
1508 | 1508 | public function constructorSetsCurrencyTranslation(): void |
1509 | 1509 | { |
1510 | 1510 | GeneralUtility::addInstance( |
1511 | | - CurrencyTranslationLoaderInterface::class, |
1512 | | - new CurrencyTranslationLoader() |
| 1511 | + CurrencyTranslationServiceInterface::class, |
| 1512 | + new CurrencyTranslationService() |
1513 | 1513 | ); |
1514 | 1514 | $cart = new Cart( |
1515 | 1515 | $this->taxClasses, |
@@ -1603,8 +1603,8 @@ protected function addFirstProductToCarts(): void |
1603 | 1603 | private function createCart(bool $isNetCart): Cart |
1604 | 1604 | { |
1605 | 1605 | GeneralUtility::addInstance( |
1606 | | - CurrencyTranslationLoaderInterface::class, |
1607 | | - new CurrencyTranslationLoader() |
| 1606 | + CurrencyTranslationServiceInterface::class, |
| 1607 | + new CurrencyTranslationService() |
1608 | 1608 | ); |
1609 | 1609 |
|
1610 | 1610 | return new Cart($this->taxClasses, $isNetCart); |
|
0 commit comments