Skip to content

Commit c649c5a

Browse files
author
Oleksandr Gorkun
committed
MAGETWO-93969: Declaring allowed HTTP methods for controllers
1 parent d5fe0bd commit c649c5a

File tree

1 file changed

+1
-4
lines changed
  • dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml

1 file changed

+1
-4
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
namespace Magento\Catalog\Controller\Adminhtml;
77

88
use Magento\Framework\App\Request\DataPersistorInterface;
9-
use Magento\Framework\Data\Form\FormKey;
109
use Magento\Framework\Message\Manager;
11-
use Magento\TestFramework\Helper\Bootstrap;
12-
1310
use Magento\Framework\App\Request\Http as HttpRequest;
1411

1512
/**
@@ -183,6 +180,7 @@ public function testSaveActionWithAlreadyExistingUrlKey(array $postData)
183180
$messageManager = $this->_objectManager->get(Manager::class);
184181
$messages = $messageManager->getMessages();
185182
$errors = $messages->getItemsByType('error');
183+
$this->assertNotEmpty($errors);
186184
$message = array_shift($errors);
187185
$this->assertSame('URL key for specified store already exists.', $message->getText());
188186
$this->assertRedirect($this->stringContains('/backend/catalog/product/new'));
@@ -250,7 +248,6 @@ public function saveActionWithAlreadyExistingUrlKeyDataProvider()
250248
'thumbnail' => '/m/a//magento_image.jpg.tmp',
251249
'swatch_image' => '/m/a//magento_image.jpg.tmp',
252250
],
253-
'form_key' => Bootstrap::getObjectManager()->get(FormKey::class)->getFormKey(),
254251
]
255252
]
256253
];

0 commit comments

Comments
 (0)