Skip to content

Commit 92320d7

Browse files
author
Maksym Novik
committed
[Backport] MAGETWO-91411: Delete action in grid could be sent multiple times.
Fixed integration tests.
1 parent ab769ad commit 92320d7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/Index/MassDeleteTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
use Magento\Customer\Api\CustomerRepositoryInterface;
99
use Magento\Customer\Api\Data\CustomerInterface;
1010
use Magento\Framework\Exception\LocalizedException;
11-
use PHPUnit\Framework\Constraint\Constraint;
1211
use Magento\Framework\Message\MessageInterface;
1312
use Magento\TestFramework\Helper\Bootstrap;
1413
use Magento\TestFramework\TestCase\AbstractBackendController;
14+
use PHPUnit_Framework_Constraint;
1515

1616
/**
1717
* @magentoAppArea adminhtml
@@ -40,13 +40,13 @@ protected function setUp()
4040
* Validates failure attempts to delete customers from grid.
4141
*
4242
* @param array|null $ids
43-
* @param Constraint $constraint
43+
* @param \PHPUnit_Framework_Constraint $constraint
4444
* @param string|null $messageType
4545
* @magentoDataFixture Magento/Customer/_files/five_repository_customers.php
4646
* @magentoDbIsolation disabled
4747
* @dataProvider failedRequestDataProvider
4848
*/
49-
public function testFailedMassDeleteAction($ids, Constraint $constraint, $messageType)
49+
public function testFailedMassDeleteAction($ids, PHPUnit_Framework_Constraint $constraint, $messageType)
5050
{
5151
$this->massDeleteAssertions($ids, $constraint, $messageType);
5252
}
@@ -55,13 +55,13 @@ public function testFailedMassDeleteAction($ids, Constraint $constraint, $messag
5555
* Validates success attempt to delete customer from grid.
5656
*
5757
* @param array $emails
58-
* @param Constraint $constraint
58+
* @param PHPUnit_Framework_Constraint $constraint
5959
* @param string $messageType
6060
* @magentoDataFixture Magento/Customer/_files/five_repository_customers.php
6161
* @magentoDbIsolation disabled
6262
* @dataProvider successRequestDataProvider
6363
*/
64-
public function testSuccessMassDeleteAction(array $emails, Constraint $constraint, string $messageType)
64+
public function testSuccessMassDeleteAction(array $emails, PHPUnit_Framework_Constraint $constraint, $messageType)
6565
{
6666
try {
6767
$ids = [];
@@ -85,10 +85,10 @@ public function testSuccessMassDeleteAction(array $emails, Constraint $constrain
8585
* Performs required request and assertions.
8686
*
8787
* @param array|null $ids
88-
* @param Constraint $constraint
88+
* @param PHPUnit_Framework_Constraint $constraint
8989
* @param string|null $messageType
9090
*/
91-
private function massDeleteAssertions($ids, Constraint $constraint, $messageType)
91+
private function massDeleteAssertions($ids, PHPUnit_Framework_Constraint $constraint, $messageType)
9292
{
9393
$requestData = [
9494
'selected' => $ids,

dev/tests/integration/testsuite/Magento/Customer/_files/five_repository_customers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
5-
5+
*/
66
use Magento\Customer\Api\CustomerRepositoryInterface;
77
use Magento\Customer\Api\Data\CustomerInterface;
88
use Magento\Customer\Api\Data\CustomerInterfaceFactory;
@@ -12,9 +12,9 @@
1212
use Magento\Framework\Indexer\IndexerRegistry;
1313
use Magento\TestFramework\Helper\Bootstrap;
1414

15+
/** @var CustomerRepositoryInterface $customerRepository */
1516
$objectManager = Bootstrap::getObjectManager();
1617

17-
/** @var CustomerRepositoryInterface $customerRepository */
1818
$customerRepository = $objectManager->create(CustomerRepositoryInterface::class);
1919
/** @var CustomerInterfaceFactory $customerFactory */
2020
$customerFactory = $objectManager->get(CustomerInterfaceFactory::class);

0 commit comments

Comments
 (0)