From 61187535256341cb77eb45347e3b19300186c14d Mon Sep 17 00:00:00 2001 From: Marc Ginesta Date: Wed, 1 Sep 2021 13:13:00 +0200 Subject: [PATCH] AC-955: Create unit test for Magento2\Less\VariablesSniff check --- Magento2/Tests/Less/VariablesUnitTest.less | 17 +++++++++++++ Magento2/Tests/Less/VariablesUnitTest.php | 28 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 Magento2/Tests/Less/VariablesUnitTest.less create mode 100644 Magento2/Tests/Less/VariablesUnitTest.php diff --git a/Magento2/Tests/Less/VariablesUnitTest.less b/Magento2/Tests/Less/VariablesUnitTest.less new file mode 100644 index 00000000..91590d20 --- /dev/null +++ b/Magento2/Tests/Less/VariablesUnitTest.less @@ -0,0 +1,17 @@ +// /** +// * Copyright © Magento, Inc. All rights reserved. +// * See COPYING.txt for license details. +// */ + +.nav { + random: 'stuff'; +} + +@INCORRECT-PROPERTY__color: red; + +// +// Variables not correctly located +// _____________________________________________ + +// Colors +@btn__color: red; diff --git a/Magento2/Tests/Less/VariablesUnitTest.php b/Magento2/Tests/Less/VariablesUnitTest.php new file mode 100644 index 00000000..c6a49ec7 --- /dev/null +++ b/Magento2/Tests/Less/VariablesUnitTest.php @@ -0,0 +1,28 @@ + 2, + 17 => 1 + ]; + } + + /** + * @inheritdoc + */ + public function getWarningList() + { + return []; + } +}