From ec668787347ccfe2c345a7e82f3e9205287d4a36 Mon Sep 17 00:00:00 2001
From: Igor Melnikov <imelnikov@magento.com>
Date: Fri, 28 Oct 2016 10:34:02 -0500
Subject: [PATCH] MAGETWO-59440: Refactor Module_Eav

Adding integration test for Magento\Catalog\Model\Config
---
 .../Magento/Catalog/Model/ConfigTest.php      | 61 +++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 dev/tests/integration/testsuite/Magento/Catalog/Model/ConfigTest.php

diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ConfigTest.php
new file mode 100644
index 00000000000..178107e487e
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ConfigTest.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Catalog\Model;
+
+use Magento\Catalog\Model\Config;
+use Magento\TestFramework\ObjectManager;
+use Magento\TestFramework\Helper\Bootstrap;
+use Magento\TestFramework\Helper\CacheCleaner;
+
+class ConfigTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Config
+     */
+    private $config;
+    
+    /**
+     * @var ObjectManager
+     */
+    private $objectManager;
+    
+    protected function setUp()
+    {
+        $this->objectManager = Bootstrap::getObjectManager();
+        $this->config = $this->objectManager->get(Config::class);
+    }
+
+    public function testGetEntityAttributeCodes()
+    {
+        $entityType = 'catalog_product';
+        CacheCleaner::cleanAll();
+        $this->assertEquals(
+            $this->config->getEntityAttributeCodes($entityType),
+            $this->config->getEntityAttributeCodes($entityType)
+        );
+    }
+
+    public function testGetAttribute()
+    {
+        $entityType = 'catalog_product';
+        $attributeCode = 'color';
+        CacheCleaner::cleanAll();
+        $this->assertEquals(
+            $this->config->getAttribute($entityType, $attributeCode),
+            $this->config->getAttribute($entityType, $attributeCode)
+        );
+    }
+
+    public function testGetEntityType()
+    {
+        $entityType = 'catalog_product';
+        CacheCleaner::cleanAll();
+        $this->assertEquals(
+            $this->config->getEntityType($entityType),
+            $this->config->getEntityType($entityType)
+        );
+    }
+}
-- 
GitLab