diff --git a/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter/CssInlinerTest.php b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter/CssInlinerTest.php index f1468f718df61..9d71604a9f941 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter/CssInlinerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter/CssInlinerTest.php @@ -75,13 +75,12 @@ public function testGetFilesEmogrifier($htmlFilePath, $cssFilePath, $cssExpected $emogrifier->setCss($css); $emogrifier->setHtml($html); $result = $emogrifier->emogrify(); + /** - * Tests a bug in the library where there's no spaces to CSS string before passing to Emogrifier - * to fix known parsing issue with library. - * This test should will fail when this bug is fixed in the library and we should fix the adapter. - * https://github.com/jjriv/emogrifier/issues/370 + * This test was implemented for the issue which existed in the older version of Emogrifier. + * Test was updated, as the library got updated as well. */ - $this->assertNotContains($cssExpected, $result); + $this->assertContains($cssExpected, $result); } /** diff --git a/lib/internal/Magento/Framework/Css/PreProcessor/Adapter/CssInliner.php b/lib/internal/Magento/Framework/Css/PreProcessor/Adapter/CssInliner.php index 342283c312293..7164e68c709fb 100644 --- a/lib/internal/Magento/Framework/Css/PreProcessor/Adapter/CssInliner.php +++ b/lib/internal/Magento/Framework/Css/PreProcessor/Adapter/CssInliner.php @@ -41,13 +41,7 @@ public function setHtml($html) */ public function setCss($css) { - /** - * Adds space to CSS string before passing to Emogrifier to fix known parsing issue with library. - * https://github.com/jjriv/emogrifier/issues/370 - */ - $cssWithAddedSpaces = preg_replace('#([\{\}>])#i', ' $1 ', $css); - - $this->emogrifier->setCss($cssWithAddedSpaces); + $this->emogrifier->setCss($css); } /**