Skip to content

Commit

Permalink
Update tests with new severity key for Phan
Browse files Browse the repository at this point in the history
  • Loading branch information
fabre-thibaud committed Oct 11, 2021
1 parent 1197974 commit e0df5d7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Phan/PhanConvertToSubset.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ final class PhanConvertToSubset extends AbstractConverter
private const SEVERITY_LEVELS = [
0 => 'info',
5 => 'minor',
10 => 'critical'
10 => 'critical',
];

public function convertToSubset(): void
{
try {
Expand Down
1 change: 1 addition & 0 deletions tests/Phan/PhanConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function testItCanConvertPhanJsonToSubset(): void
[
'description' => '(Phan) UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \PhpParser\Node\Stmt\ClassMethod',
'fingerprint' => 'e8547906ee21b4f8e8804de980a9d239',
'severity' => 'critical',
'location' => [
'path' => 'app/Class.php',
'lines' => [
Expand Down
3 changes: 2 additions & 1 deletion tests/Phan/fixtures/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
"description": "(Phan) UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \\PhpParser\\Node\\Stmt\\ClassMethod",
"fingerprint": "e8547906ee21b4f8e8804de980a9d239",
"severity": "critical",
"location": {
"path": "app/Class.php",
"lines": {
Expand All @@ -10,4 +11,4 @@
}
}
}
]
]
1 change: 1 addition & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function multipleConvertersProvider(): array
'output' => [
'description' => '(Phan) UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \PhpParser\Node\Stmt\ClassMethod',
'fingerprint' => 'e8547906ee21b4f8e8804de980a9d239',
'severity' => 'critical',
'location' => [
'path' => 'app/Class.php',
'lines' => [
Expand Down
3 changes: 2 additions & 1 deletion tests/fixtures/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
"description": "(Phan) UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \\PhpParser\\Node\\Stmt\\ClassMethod",
"fingerprint": "e8547906ee21b4f8e8804de980a9d239",
"severity": "critical",
"location": {
"path": "app/Class.php",
"lines": {
Expand Down Expand Up @@ -61,4 +62,4 @@
}
}
}
]
]

0 comments on commit e0df5d7

Please sign in to comment.