-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Imported] AC-945: Create unit test for Magento2\Less\CommentLevelsSn…
…iff check (#34) https://jira.corp.magento.com/browse/AC-945
- Loading branch information
1 parent
e83a012
commit cf9c0dd
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 []; | ||
} | ||
} |