Skip to content
Snippets Groups Projects
Commit bf646df6 authored by Igor Melnikov's avatar Igor Melnikov Committed by Olga Kopylova
Browse files

MAGETWO-59440: Refactor Module_Eav

Introducing SerializerInterface
parent f234642e
No related merge requests found
...@@ -8,6 +8,7 @@ namespace Magento\Eav\Model; ...@@ -8,6 +8,7 @@ namespace Magento\Eav\Model;
use Magento\Eav\Model\Config; use Magento\Eav\Model\Config;
use Magento\TestFramework\ObjectManager; use Magento\TestFramework\ObjectManager;
use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Helper\Bootstrap;
use Magento\TestFramework\Helper\CacheCleaner;
class ConfigTest extends \PHPUnit_Framework_TestCase class ConfigTest extends \PHPUnit_Framework_TestCase
{ {
...@@ -30,20 +31,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase ...@@ -30,20 +31,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
public function testGetEntityAttributeCodes() public function testGetEntityAttributeCodes()
{ {
$entityType = 'catalog_product'; $entityType = 'catalog_product';
$this->cleanAllCache(); CacheCleaner::cleanAll();
$this->assertEquals( $this->assertEquals(
$this->config->getEntityAttributeCodes($entityType), $this->config->getEntityAttributeCodes($entityType),
$this->config->getEntityAttributeCodes($entityType) $this->config->getEntityAttributeCodes($entityType)
); );
} }
private function cleanAllCache()
{
/** @var \Magento\Framework\App\Cache\Frontend\Pool $cachePool */
$cachePool = $this->objectManager->get(\Magento\Framework\App\Cache\Frontend\Pool::class);
/** @var \Magento\Framework\Cache\FrontendInterface $cacheType */
foreach ($cachePool as $cacheType) {
$cacheType->getBackend()->clean();
}
}
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment