From fbe491c50275a1753c15e18478823196a959525b Mon Sep 17 00:00:00 2001 From: Marc Ginesta Date: Tue, 31 Aug 2021 12:02:11 +0200 Subject: [PATCH 1/2] AC-946: Create unit test for Magento2\Less\ImportantPropertySniff check --- .../Tests/Less/ImportantPropertyUnitTest.less | 12 +++++++++ .../Tests/Less/ImportantPropertyUnitTest.php | 27 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 Magento2/Tests/Less/ImportantPropertyUnitTest.less create mode 100644 Magento2/Tests/Less/ImportantPropertyUnitTest.php diff --git a/Magento2/Tests/Less/ImportantPropertyUnitTest.less b/Magento2/Tests/Less/ImportantPropertyUnitTest.less new file mode 100644 index 00000000..0a0783ba --- /dev/null +++ b/Magento2/Tests/Less/ImportantPropertyUnitTest.less @@ -0,0 +1,12 @@ +// /** +// * Copyright © Magento, Inc. All rights reserved. +// * See COPYING.txt for license details. +// */ + +.correct-important-property { + background-color: green !important; +} + +.incorrect-important-property { + background-color: red!important; +} diff --git a/Magento2/Tests/Less/ImportantPropertyUnitTest.php b/Magento2/Tests/Less/ImportantPropertyUnitTest.php new file mode 100644 index 00000000..8e741896 --- /dev/null +++ b/Magento2/Tests/Less/ImportantPropertyUnitTest.php @@ -0,0 +1,27 @@ + 1 + ]; + } + + /** + * @inheritdoc + */ + public function getWarningList() + { + return []; + } +} \ No newline at end of file From 83e6536033d4092d4ee3830179c16b1b70362a1e Mon Sep 17 00:00:00 2001 From: Marc Ginesta Date: Tue, 31 Aug 2021 12:03:57 +0200 Subject: [PATCH 2/2] AC-946: Create unit test for Magento2\Less\ImportantPropertySniff check - Add new line at the EOF --- Magento2/Tests/Less/ImportantPropertyUnitTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Magento2/Tests/Less/ImportantPropertyUnitTest.php b/Magento2/Tests/Less/ImportantPropertyUnitTest.php index 8e741896..c3044415 100644 --- a/Magento2/Tests/Less/ImportantPropertyUnitTest.php +++ b/Magento2/Tests/Less/ImportantPropertyUnitTest.php @@ -24,4 +24,4 @@ public function getWarningList() { return []; } -} \ No newline at end of file +}