Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 47a7406

Browse files
author
Stanislav Idolov
committed
CheckoutAgreements getList refactoring
1 parent 8f293fd commit 47a7406

File tree

4 files changed

+0
-26
lines changed

4 files changed

+0
-26
lines changed

app/code/Magento/CheckoutAgreements/Model/Checkout/Plugin/GuestValidation.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ class GuestValidation
2323
*/
2424
private $scopeConfiguration;
2525

26-
/**
27-
* @var \Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface
28-
*/
29-
private $checkoutAgreementsRepository;
30-
3126
/**
3227
* @var \Magento\Checkout\Api\AgreementsValidatorInterface
3328
*/
@@ -46,20 +41,17 @@ class GuestValidation
4641
/**
4742
* @param \Magento\Checkout\Api\AgreementsValidatorInterface $agreementsValidator
4843
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfiguration
49-
* @param \Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface $checkoutAgreementsRepository
5044
* @param \Magento\CheckoutAgreements\Api\CheckoutAgreementsListInterface $checkoutAgreementsList
5145
* @param ActiveStoreAgreementsFilter $activeStoreAgreementsFilter
5246
*/
5347
public function __construct(
5448
\Magento\Checkout\Api\AgreementsValidatorInterface $agreementsValidator,
5549
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfiguration,
56-
\Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface $checkoutAgreementsRepository,
5750
\Magento\CheckoutAgreements\Api\CheckoutAgreementsListInterface $checkoutAgreementsList,
5851
\Magento\CheckoutAgreements\Model\Api\SearchCriteria\ActiveStoreAgreementsFilter $activeStoreAgreementsFilter
5952
) {
6053
$this->agreementsValidator = $agreementsValidator;
6154
$this->scopeConfiguration = $scopeConfiguration;
62-
$this->checkoutAgreementsRepository = $checkoutAgreementsRepository;
6355
$this->checkoutAgreementsList = $checkoutAgreementsList;
6456
$this->activeStoreAgreementsFilter = $activeStoreAgreementsFilter;
6557
}

app/code/Magento/CheckoutAgreements/Model/Checkout/Plugin/Validation.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ class Validation
1919
*/
2020
protected $scopeConfiguration;
2121

22-
/**
23-
* @var \Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface
24-
*/
25-
protected $checkoutAgreementsRepository;
26-
2722
/**
2823
* @var \Magento\Checkout\Api\AgreementsValidatorInterface
2924
*/
@@ -42,20 +37,17 @@ class Validation
4237
/**
4338
* @param \Magento\Checkout\Api\AgreementsValidatorInterface $agreementsValidator
4439
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfiguration
45-
* @param \Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface $checkoutAgreementsRepository
4640
* @param \Magento\CheckoutAgreements\Api\CheckoutAgreementsListInterface $checkoutAgreementsList
4741
* @param ActiveStoreAgreementsFilter $activeStoreAgreementsFilter
4842
*/
4943
public function __construct(
5044
\Magento\Checkout\Api\AgreementsValidatorInterface $agreementsValidator,
5145
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfiguration,
52-
\Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface $checkoutAgreementsRepository,
5346
\Magento\CheckoutAgreements\Api\CheckoutAgreementsListInterface $checkoutAgreementsList,
5447
\Magento\CheckoutAgreements\Model\Api\SearchCriteria\ActiveStoreAgreementsFilter $activeStoreAgreementsFilter
5548
) {
5649
$this->agreementsValidator = $agreementsValidator;
5750
$this->scopeConfiguration = $scopeConfiguration;
58-
$this->checkoutAgreementsRepository = $checkoutAgreementsRepository;
5951
$this->checkoutAgreementsList = $checkoutAgreementsList;
6052
$this->activeStoreAgreementsFilter = $activeStoreAgreementsFilter;
6153
}

app/code/Magento/CheckoutAgreements/Test/Unit/Model/Checkout/Plugin/GuestValidationTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ protected function setUp()
6666
['getAgreementIds']
6767
);
6868
$this->scopeConfigMock = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class);
69-
$repositoryMock = $this->createMock(
70-
\Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface::class
71-
);
72-
7369
$this->checkoutAgreementsListMock = $this->createMock(
7470
\Magento\CheckoutAgreements\Api\CheckoutAgreementsListInterface::class
7571
);
@@ -80,7 +76,6 @@ protected function setUp()
8076
$this->model = new \Magento\CheckoutAgreements\Model\Checkout\Plugin\GuestValidation(
8177
$this->agreementsValidatorMock,
8278
$this->scopeConfigMock,
83-
$repositoryMock,
8479
$this->checkoutAgreementsListMock,
8580
$this->agreementsFilterMock
8681
);

app/code/Magento/CheckoutAgreements/Test/Unit/Model/Checkout/Plugin/ValidationTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ protected function setUp()
6666
['getAgreementIds']
6767
);
6868
$this->scopeConfigMock = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class);
69-
$repositoryMock = $this->createMock(
70-
\Magento\CheckoutAgreements\Api\CheckoutAgreementsRepositoryInterface::class
71-
);
72-
7369
$this->checkoutAgreementsListMock = $this->createMock(
7470
\Magento\CheckoutAgreements\Api\CheckoutAgreementsListInterface::class
7571
);
@@ -80,7 +76,6 @@ protected function setUp()
8076
$this->model = new \Magento\CheckoutAgreements\Model\Checkout\Plugin\Validation(
8177
$this->agreementsValidatorMock,
8278
$this->scopeConfigMock,
83-
$repositoryMock,
8479
$this->checkoutAgreementsListMock,
8580
$this->agreementsFilterMock
8681
);

0 commit comments

Comments
 (0)