Skip to content
Snippets Groups Projects
Commit 08d5758c authored by Leonid Poluyanov's avatar Leonid Poluyanov
Browse files

MAGETWO-60037: User is able to create empty URL key for category which leads to numerous errors

parent b56d8d23
No related merge requests found
...@@ -41,6 +41,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase ...@@ -41,6 +41,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase
} }
/** /**
* @magentoAppArea adminhtml
* @magentoDataFixture Magento/Catalog/_files/indexer_catalog_category.php * @magentoDataFixture Magento/Catalog/_files/indexer_catalog_category.php
* @magentoDbIsolation enabled * @magentoDbIsolation enabled
*/ */
...@@ -214,7 +215,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase ...@@ -214,7 +215,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase
\Magento\Catalog\Model\Category::class \Magento\Catalog\Model\Category::class
); );
$result = $category->getCollection()->getItems(); $result = $category->getCollection()->addAttributeToSelect('name')->getItems();
$result = array_slice($result, 2); $result = array_slice($result, 2);
return array_slice($result, 0, $count); return array_slice($result, 0, $count);
......
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