From a9a1a467335cf4253e9e4092fac3668dcee9d467 Mon Sep 17 00:00:00 2001 From: Sergio Vera Date: Wed, 1 Sep 2021 12:23:06 +0200 Subject: [PATCH 1/2] AC-944: Create unit test for Magento2\Less\CombinatorIndentationSniff check --- .../Less/CombinatorIndentationUnitTest.less | 20 +++++++++++++ .../Less/CombinatorIndentationUnitTest.php | 29 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 Magento2/Tests/Less/CombinatorIndentationUnitTest.less create mode 100644 Magento2/Tests/Less/CombinatorIndentationUnitTest.php diff --git a/Magento2/Tests/Less/CombinatorIndentationUnitTest.less b/Magento2/Tests/Less/CombinatorIndentationUnitTest.less new file mode 100644 index 00000000..0d8a4932 --- /dev/null +++ b/Magento2/Tests/Less/CombinatorIndentationUnitTest.less @@ -0,0 +1,20 @@ +// /** +// * Copyright © Magento, Inc. All rights reserved. +// * See COPYING.txt for license details. +// */ + +.nav+.bar { + color: @bar__color; +} + +.nav +.foo { + color: @bar__color; +} + +.nav+ .baz { + color: @bar__color; +} + +.nav + .qux { + color: @bar__color; +} \ No newline at end of file diff --git a/Magento2/Tests/Less/CombinatorIndentationUnitTest.php b/Magento2/Tests/Less/CombinatorIndentationUnitTest.php new file mode 100644 index 00000000..d3e5c882 --- /dev/null +++ b/Magento2/Tests/Less/CombinatorIndentationUnitTest.php @@ -0,0 +1,29 @@ + 1, + 10 => 1, + 14 => 1, + ]; + } + + /** + * @inheritdoc + */ + public function getWarningList() + { + return []; + } +} From a728d6efac41799642123894147e9cebe0a67f20 Mon Sep 17 00:00:00 2001 From: Sergio Vera Date: Wed, 1 Sep 2021 12:23:59 +0200 Subject: [PATCH 2/2] AC-944: Create unit test for Magento2\Less\CombinatorIndentationSniff check --- Magento2/Tests/Less/CombinatorIndentationUnitTest.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Magento2/Tests/Less/CombinatorIndentationUnitTest.less b/Magento2/Tests/Less/CombinatorIndentationUnitTest.less index 0d8a4932..fb66cd1d 100644 --- a/Magento2/Tests/Less/CombinatorIndentationUnitTest.less +++ b/Magento2/Tests/Less/CombinatorIndentationUnitTest.less @@ -17,4 +17,4 @@ .nav + .qux { color: @bar__color; -} \ No newline at end of file +}