Skip to content

Commit 7786fba

Browse files
committed
Update tests with new severity key for Phan
1 parent 1197974 commit 7786fba

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

src/Phan/PhanConvertToSubset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ final class PhanConvertToSubset extends AbstractConverter
1212
private const SEVERITY_LEVELS = [
1313
0 => 'info',
1414
5 => 'minor',
15-
10 => 'critical'
15+
10 => 'critical',
1616
];
17-
17+
1818
public function convertToSubset(): void
1919
{
2020
try {

tests/Phan/PhanConverterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function testItCanConvertPhanJsonToSubset(): void
4040
[
4141
'description' => '(Phan) UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \PhpParser\Node\Stmt\ClassMethod',
4242
'fingerprint' => 'e8547906ee21b4f8e8804de980a9d239',
43+
'severity' => 'critical',
4344
'location' => [
4445
'path' => 'app/Class.php',
4546
'lines' => [

tests/Phan/fixtures/output.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"description": "(Phan) UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \\PhpParser\\Node\\Stmt\\ClassMethod",
44
"fingerprint": "e8547906ee21b4f8e8804de980a9d239",
5+
"severity": "critical",
56
"location": {
67
"path": "app/Class.php",
78
"lines": {

tests/TestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function multipleConvertersProvider(): array
3434
'output' => [
3535
'description' => '(Phan) UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \PhpParser\Node\Stmt\ClassMethod',
3636
'fingerprint' => 'e8547906ee21b4f8e8804de980a9d239',
37+
'severity' => 'critical',
3738
'location' => [
3839
'path' => 'app/Class.php',
3940
'lines' => [

tests/fixtures/output.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"description": "(Phan) UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \\PhpParser\\Node\\Stmt\\ClassMethod",
44
"fingerprint": "e8547906ee21b4f8e8804de980a9d239",
5+
"severity": "critical",
56
"location": {
67
"path": "app/Class.php",
78
"lines": {

0 commit comments

Comments
 (0)