Skip to content

Commit

Permalink
Merge pull request #10574 from edsrzf/unit-test-improvements
Browse files Browse the repository at this point in the history
Unit test improvements for php-parser 5
  • Loading branch information
orklah committed Jan 24, 2024
2 parents 541bf51 + d3eb02a commit 9616b14
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 3 additions & 1 deletion tests/ClassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ class T extends \PHPUnit\Framework\TestCase {
],
'classAliasNoException' => [
'code' => '<?php
class_alias("Bar\F1", "Bar\F2");
namespace {
class_alias("Bar\F1", "Bar\F2");
}
namespace Bar {
class F1 {
Expand Down
16 changes: 8 additions & 8 deletions tests/FileUpdates/TemporaryUpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ public function foo() : void {
class A {
public function foo() : void {
throw new Error("bad", 5);
throw new Error("bad", []);
}
}',
],
Expand All @@ -613,7 +613,7 @@ public function foo() : void {
class A {
public function foo() : void {
throw new Error("bad", 5);
throw new Error("bad", []);
}
}',
],
Expand Down Expand Up @@ -657,7 +657,7 @@ public function foo() : void {
class A {
public function foo() : void {
throw new E("bad", 5);
throw new E("bad", []);
}
}',
],
Expand All @@ -667,7 +667,7 @@ public function foo() : void {
class A {
public function foo() : void {
throw new E("bad", 5);
throw new E("bad", []);
}
}',
],
Expand Down Expand Up @@ -707,7 +707,7 @@ public function foo() : void {
class A {
public function foo() : void {
throw new Error("bad", 5);
throw new Error("bad", []);
}
}',
],
Expand All @@ -717,7 +717,7 @@ public function foo() : void {
class A {
public function foo() : void {
throw new Error("bad", 5);
throw new Error("bad", []);
}
}',
],
Expand Down Expand Up @@ -755,7 +755,7 @@ public function foo() : void {
class A {
public function foo() : void {
throw new E("bad", 5);
throw new E("bad", []);
}
}',
],
Expand All @@ -765,7 +765,7 @@ public function foo() : void {
class A {
public function foo() : void {
throw new E("bad", 5);
throw new E("bad", []);
}
}',
],
Expand Down
2 changes: 1 addition & 1 deletion tests/PropertyTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ class Finally_ extends Node\Stmt
* 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);
Expand Down

0 comments on commit 9616b14

Please sign in to comment.