Skip to content

Commit 91cc7bb

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/DocComment: improve code coverage
Adds two tests to check that the sniffer triggers an error when it finds empty doc comments.
1 parent 69e5d9d commit 91cc7bb

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.1.inc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,13 @@
258258
*
259259
* @return void
260260
*/
261+
262+
// Tests to check handling empty doc comments.
263+
/**
264+
*/
265+
266+
/**
267+
*
268+
*
269+
*
270+
*/

src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.1.inc.fixed

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,13 @@
263263
*
264264
* @return void
265265
*/
266+
267+
// Tests to check handling empty doc comments.
268+
/**
269+
*/
270+
271+
/**
272+
*
273+
*
274+
*
275+
*/

src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.1.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,13 @@
258258
*
259259
* @return void
260260
*/
261+
262+
// Tests to check handling empty doc comments.
263+
/**
264+
*/
265+
266+
/**
267+
*
268+
*
269+
*
270+
*/

src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.1.js.fixed

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,13 @@
263263
*
264264
* @return void
265265
*/
266+
267+
// Tests to check handling empty doc comments.
268+
/**
269+
*/
270+
271+
/**
272+
*
273+
*
274+
*
275+
*/

src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ public function getErrorList($testFile='')
9898
246 => 1,
9999
248 => 1,
100100
249 => 1,
101+
263 => 1,
102+
266 => 1,
101103
];
102104

103105
default:

0 commit comments

Comments
 (0)