Skip to content

Commit

Permalink
[Imported] AC-945: Create unit test for Magento2\Less\CommentLevelsSn…
Browse files Browse the repository at this point in the history
  • Loading branch information
magento-engcom-team authored Aug 31, 2021
1 parent e83a012 commit cf9c0dd
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Magento2/Tests/Less/CommentLevelsUnitTest.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// /**
// * Copyright © Magento, Inc. All rights reserved.
// * See COPYING.txt for license details.
// */

//
// First level comment
// _____________________________________________

.first-level {
background-color: green;
}

//
// Incorrect First level comment
// _____________________________________________
.incorrect-first-level {
background-color: red;
}

//
// Second level comment
// ---------------------------------------------

.second-level {
background-color: green;
}

//
// Incorrect Second level comment
// ---------------------------------------------

.incorrect-second-level {
background-color: red;
}

// third level comment
.third-level-nav {
// New line comment, considered third level too
background-color: green; // ToDo UI: todo inline comment
color: white; // inline comment
}

//Incorrect third level comment
.incorrect-third-level {
// Incorrect new line comment
color: red; // incorrect inline comment
}
32 changes: 32 additions & 0 deletions Magento2/Tests/Less/CommentLevelsUnitTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* Copyright © Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento2\Tests\Less;

class CommentLevelsUnitTest extends AbstractLessSniffUnitTestCase
{
/**
* @inheritdoc
*/
public function getErrorList()
{
return [
16 => 1,
30 => 1,
31 => 1,
44 => 1,
46 => 1,
47 => 1
];
}

/**
* @inheritdoc
*/
public function getWarningList()
{
return [];
}
}

0 comments on commit cf9c0dd

Please sign in to comment.