Skip to content

Commit 9cea4d0

Browse files
committed
MAGETWO-34477: Backend Menu Accessibility improvements
1 parent b20e87c commit 9cea4d0

File tree

1 file changed

+20
-1
lines changed
  • dev/tests/integration/testsuite/Magento/Backend/Block

1 file changed

+20
-1
lines changed

dev/tests/integration/testsuite/Magento/Backend/Block/MenuTest.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@ class MenuTest extends \PHPUnit_Framework_TestCase
1919
*/
2020
protected $blockMenu;
2121

22+
/** @var \Magento\Framework\App\Cache\Type\Config $configCacheType */
23+
protected $configCacheType;
24+
2225
protected function setUp()
2326
{
27+
$this->configCacheType = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
28+
'Magento\Framework\App\Cache\Type\Config'
29+
);
30+
$this->configCacheType->save('', \Magento\Backend\Model\Menu\Config::CACHE_MENU_OBJECT);
31+
2432
$this->blockMenu = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
2533
'Magento\Backend\Block\Menu'
2634
);
@@ -65,7 +73,10 @@ protected function prepareMenuConfig()
6573

6674
return \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
6775
'Magento\Backend\Model\Menu\Config',
68-
['configReader' => $configReader]
76+
[
77+
'configReader' => $configReader,
78+
'configCacheType' => $this->configCacheType
79+
]
6980
);
7081
}
7182

@@ -81,4 +92,12 @@ protected function loginAdminUser()
8192
$auth = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Backend\Model\Auth');
8293
$auth->login(\Magento\TestFramework\Bootstrap::ADMIN_NAME, \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD);
8394
}
95+
96+
/**
97+
* @return void
98+
*/
99+
protected function tearDown()
100+
{
101+
$this->configCacheType->save('', \Magento\Backend\Model\Menu\Config::CACHE_MENU_OBJECT);
102+
}
84103
}

0 commit comments

Comments
 (0)