Skip to content

Commit

Permalink
[Backport] MAGETWO-91411: Delete action in grid could be sent multipl…
Browse files Browse the repository at this point in the history
…e times.

Fixed integration tests.
  • Loading branch information
Maksym Novik committed Jul 12, 2018
1 parent ab769ad commit 92320d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
use Magento\Customer\Api\CustomerRepositoryInterface;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Framework\Exception\LocalizedException;
use PHPUnit\Framework\Constraint\Constraint;
use Magento\Framework\Message\MessageInterface;
use Magento\TestFramework\Helper\Bootstrap;
use Magento\TestFramework\TestCase\AbstractBackendController;
use PHPUnit_Framework_Constraint;

/**
* @magentoAppArea adminhtml
Expand Down Expand Up @@ -40,13 +40,13 @@ protected function setUp()
* Validates failure attempts to delete customers from grid.
*
* @param array|null $ids
* @param Constraint $constraint
* @param \PHPUnit_Framework_Constraint $constraint
* @param string|null $messageType
* @magentoDataFixture Magento/Customer/_files/five_repository_customers.php
* @magentoDbIsolation disabled
* @dataProvider failedRequestDataProvider
*/
public function testFailedMassDeleteAction($ids, Constraint $constraint, $messageType)
public function testFailedMassDeleteAction($ids, PHPUnit_Framework_Constraint $constraint, $messageType)
{
$this->massDeleteAssertions($ids, $constraint, $messageType);
}
Expand All @@ -55,13 +55,13 @@ public function testFailedMassDeleteAction($ids, Constraint $constraint, $messag
* Validates success attempt to delete customer from grid.
*
* @param array $emails
* @param Constraint $constraint
* @param PHPUnit_Framework_Constraint $constraint
* @param string $messageType
* @magentoDataFixture Magento/Customer/_files/five_repository_customers.php
* @magentoDbIsolation disabled
* @dataProvider successRequestDataProvider
*/
public function testSuccessMassDeleteAction(array $emails, Constraint $constraint, string $messageType)
public function testSuccessMassDeleteAction(array $emails, PHPUnit_Framework_Constraint $constraint, $messageType)
{
try {
$ids = [];
Expand All @@ -85,10 +85,10 @@ public function testSuccessMassDeleteAction(array $emails, Constraint $constrain
* Performs required request and assertions.
*
* @param array|null $ids
* @param Constraint $constraint
* @param PHPUnit_Framework_Constraint $constraint
* @param string|null $messageType
*/
private function massDeleteAssertions($ids, Constraint $constraint, $messageType)
private function massDeleteAssertions($ids, PHPUnit_Framework_Constraint $constraint, $messageType)
{
$requestData = [
'selected' => $ids,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
use Magento\Customer\Api\CustomerRepositoryInterface;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Customer\Api\Data\CustomerInterfaceFactory;
Expand All @@ -12,9 +12,9 @@
use Magento\Framework\Indexer\IndexerRegistry;
use Magento\TestFramework\Helper\Bootstrap;

/** @var CustomerRepositoryInterface $customerRepository */
$objectManager = Bootstrap::getObjectManager();

/** @var CustomerRepositoryInterface $customerRepository */
$customerRepository = $objectManager->create(CustomerRepositoryInterface::class);
/** @var CustomerInterfaceFactory $customerFactory */
$customerFactory = $objectManager->get(CustomerInterfaceFactory::class);
Expand Down

0 comments on commit 92320d7

Please sign in to comment.