From 3e53d45db07dc711031ad251f4c7cb8019e3b6ba Mon Sep 17 00:00:00 2001
From: cspruiell <cspruiell@magento.com>
Date: Wed, 5 Oct 2016 15:39:48 -0500
Subject: [PATCH] MAGETWO-59105: Errors on storefront after install for MPAF
 builds

 - fix L4 failures
---
 .../Adminhtml/Product/Initialization/HelperTest.php       | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Initialization/HelperTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Initialization/HelperTest.php
index edd654a7393..a4218e92b34 100644
--- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Initialization/HelperTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Initialization/HelperTest.php
@@ -278,15 +278,19 @@ class HelperTest extends \PHPUnit_Framework_TestCase
             ->method('getOptionsReadOnly')
             ->willReturn(false);
 
+        $firstExpectedCustomOption = clone $this->customOptionMock;
+        $firstExpectedCustomOption->setData($optionsData['option2']);
+        $secondExpectedCustomOption = clone $this->customOptionMock;
+        $secondExpectedCustomOption->setData($optionsData['option3']);
         $this->customOptionFactoryMock->expects($this->any())
             ->method('create')
             ->willReturnMap([
                 [
                     ['data' => $optionsData['option2']],
-                    (clone $this->customOptionMock)->setData($optionsData['option2'])
+                    $firstExpectedCustomOption
                 ], [
                     ['data' => $optionsData['option3']],
-                    (clone $this->customOptionMock)->setData($optionsData['option3'])
+                    $secondExpectedCustomOption
                 ]
             ]);
 
-- 
GitLab