Skip to content

Commit aee318a

Browse files
committed
add test for continue
1 parent 9ee7171 commit aee318a

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

tests/PHPStan/Rules/Keywords/ContinueBreakInLoopRuleTest.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,22 @@ public function testPropertyHooks(): void
7676

7777
public function testBug13790(): void
7878
{
79-
$this->analyse([__DIR__ . '/data/bug-13790.php'], [
79+
$this->analyse(
8080
[
81-
'Keyword break used outside of a loop or a switch statement.',
82-
2,
81+
__DIR__ . '/data/bug-13790-break.php',
82+
__DIR__ . '/data/bug-13790-continue.php',
8383
],
84-
]);
84+
[
85+
[
86+
'Keyword break used outside of a loop or a switch statement.',
87+
2,
88+
],
89+
[
90+
'Keyword continue used outside of a loop or a switch statement.',
91+
2,
92+
],
93+
],
94+
);
8595
}
8696

8797
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
continue;

0 commit comments

Comments
 (0)