From c5b040cfd6895ace11ed5d13f1fb19fb655c7aba Mon Sep 17 00:00:00 2001 From: Oleksii Korshenko Date: Thu, 29 Jun 2017 11:25:31 -0500 Subject: [PATCH] MAGETWO-69452: Remove zend json from form elements #9754 - fixed static tests --- .../Data/Test/Unit/Form/Element/EditorTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php index be9fa81ddfc45..ae0445b9550ea 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php @@ -210,13 +210,15 @@ public function testGetConfig() */ public function testGetTranslatedString() { + $callback = function ($params) { + return json_encode($params); + }; + $this->configMock->expects($this->any())->method('getData')->withConsecutive(['enabled'])->willReturn(true); $this->serializer->expects($this->any()) ->method('serialize') - ->willReturnCallback(function ($params) { - return json_encode($params); - } - ); + ->willReturnCallback($callback); + $html = $this->model->getElementHtml(); $this->assertRegExp('/.*"Insert Image...":"Insert Image...".*/i', $html);