1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

Merge pull request #10574 from edsrzf/unit-test-improvements

Unit test improvements for php-parser 5
This commit is contained in:
orklah 2024-01-24 23:59:23 +01:00 committed by GitHub
commit 9616b14253
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 10 deletions

View File

@ -464,7 +464,9 @@ class ClassTest extends TestCase
],
'classAliasNoException' => [
'code' => '<?php
namespace {
class_alias("Bar\F1", "Bar\F2");
}
namespace Bar {
class F1 {

View File

@ -603,7 +603,7 @@ class TemporaryUpdateTest extends TestCase
class A {
public function foo() : void {
throw new Error("bad", 5);
throw new Error("bad", []);
}
}',
],
@ -613,7 +613,7 @@ class TemporaryUpdateTest extends TestCase
class A {
public function foo() : void {
throw new Error("bad", 5);
throw new Error("bad", []);
}
}',
],
@ -657,7 +657,7 @@ class TemporaryUpdateTest extends TestCase
class A {
public function foo() : void {
throw new E("bad", 5);
throw new E("bad", []);
}
}',
],
@ -667,7 +667,7 @@ class TemporaryUpdateTest extends TestCase
class A {
public function foo() : void {
throw new E("bad", 5);
throw new E("bad", []);
}
}',
],
@ -707,7 +707,7 @@ class TemporaryUpdateTest extends TestCase
class A {
public function foo() : void {
throw new Error("bad", 5);
throw new Error("bad", []);
}
}',
],
@ -717,7 +717,7 @@ class TemporaryUpdateTest extends TestCase
class A {
public function foo() : void {
throw new Error("bad", 5);
throw new Error("bad", []);
}
}',
],
@ -755,7 +755,7 @@ class TemporaryUpdateTest extends TestCase
class A {
public function foo() : void {
throw new E("bad", 5);
throw new E("bad", []);
}
}',
],
@ -765,7 +765,7 @@ class TemporaryUpdateTest extends TestCase
class A {
public function foo() : void {
throw new E("bad", 5);
throw new E("bad", []);
}
}',
],

View File

@ -1166,7 +1166,7 @@ class PropertyTypeTest extends TestCase
* Constructs a finally node.
*
* @param list<Node\Stmt> $stmts Statements
* @param array $attributes Additional attributes
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $stmts = array(), array $attributes = array()) {
parent::__construct($attributes);