Skip to content

Commit 4fb8386

Browse files
author
Vincent Langlet
committed
🚨 Add tests for ClassComment
1 parent 4eb8d72 commit 4fb8386

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
class ClassTest1
4+
{
5+
}
6+
7+
/**
8+
* Short description.
9+
*/
10+
class ClassTest2
11+
{
12+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
/**
4+
* Unit test class for the ClassComment sniff.
5+
*
6+
* A sniff unit test checks a .inc file for expected violations of a single
7+
* coding standard. Expected errors and warnings are stored in this class.
8+
*/
9+
class Symfony3Custom_Tests_Commenting_ClassCommentUnitTest
10+
extends AbstractSniffUnitTest
11+
{
12+
/**
13+
* Returns the lines where errors should occur.
14+
*
15+
* The key of the array should represent the line number and the value
16+
* should represent the number of errors that should occur on that line.
17+
*
18+
* @return array<int, int>
19+
*/
20+
public function getErrorList()
21+
{
22+
return array(
23+
3 => 1,
24+
);
25+
}
26+
27+
/**
28+
* Returns the lines where warnings should occur.
29+
*
30+
* The key of the array should represent the line number and the value
31+
* should represent the number of warnings that should occur on that line.
32+
*
33+
* @return array(int => int)
34+
*/
35+
protected function getWarningList()
36+
{
37+
return array();
38+
}
39+
}

0 commit comments

Comments
 (0)