From 0f9cd5e6a607bde09d1c30cb201b6de32c7c0943 Mon Sep 17 00:00:00 2001
From: Dmytro Aponasenko <daponasenko@ebay.com>
Date: Wed, 24 Dec 2014 15:01:28 +0200
Subject: [PATCH] MTA-1247: Sync qmt repository with mainline - Sprint 2

---
 dev/tests/functional/composer.json                          | 2 +-
 .../Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php  | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dev/tests/functional/composer.json b/dev/tests/functional/composer.json
index ab4bd87728a..e2e3d4ad289 100644
--- a/dev/tests/functional/composer.json
+++ b/dev/tests/functional/composer.json
@@ -1,6 +1,6 @@
 {
     "require": {
-        "magento/mtf": "1.0.0-rc10",
+        "magento/mtf": "1.0.0-rc11",
         "php": ">=5.4.0",
         "phpunit/phpunit": "4.1.0",
         "phpunit/phpunit-selenium": ">=1.2",
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php
index 6402bd1873a..851892347af 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php
@@ -121,9 +121,11 @@ class Tree extends Block
     protected function prepareFullCategoryPath(CatalogCategory $category)
     {
         $path = [];
-        $parentCategory = $category->getDataFieldConfig('parent_id')['source']->getParentCategory();
+        $parentCategory = $category->hasData('parent_id')
+            ? $category->getDataFieldConfig('parent_id')['source']->getParentCategory()
+            : null;
 
-        if ($parentCategory != null) {
+        if ($parentCategory !== null) {
             $path = $this->prepareFullCategoryPath($parentCategory);
         }
         return array_filter(array_merge($path, [$category->getPath(), $category->getName()]));
-- 
GitLab