Skip to content

Commit 1911b08

Browse files
author
Dmytro Voskoboinikov
committed
MAGETWO-88600: Error while saving Theme design configuration
1 parent 9e801de commit 1911b08

File tree

1 file changed

+30
-1
lines changed
  • dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/Config

1 file changed

+30
-1
lines changed

dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/Config/SaveTest.php

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
*/
1515
class SaveTest extends AbstractBackendController
1616
{
17+
/**
18+
* @var FormKey
19+
*/
20+
private $formKey;
21+
1722
/**
1823
* @inheritdoc
1924
*/
@@ -24,6 +29,15 @@ class SaveTest extends AbstractBackendController
2429
*/
2530
protected $uri = 'backend/theme/design_config/save';
2631

32+
protected function setUp()
33+
{
34+
parent::setUp();
35+
36+
$this->formKey = $this->_objectManager->get(
37+
FormKey::class
38+
);
39+
}
40+
2741
/**
2842
* Test design configuration save valid values.
2943
*
@@ -89,7 +103,22 @@ private function getRequestParams()
89103
'watermark_swatch_image_imageOpacity' => '',
90104
'watermark_swatch_image_position' => 'stretch',
91105
'scope' => 'default',
92-
'form_key' => $this->_objectManager->get(FormKey::class)->getFormKey(),
106+
'form_key' => $this->formKey->getFormKey(),
93107
];
94108
}
109+
110+
public function testAclHasAccess()
111+
{
112+
$this->getRequest()->setMethod(
113+
\Zend\Http\Request::METHOD_POST
114+
);
115+
116+
$this->getRequest()->setParams(
117+
[
118+
'form_key' => $this->formKey->getFormKey()
119+
]
120+
);
121+
122+
parent::testAclHasAccess();
123+
}
95124
}

0 commit comments

Comments
 (0)