Skip to content

Commit

Permalink
Avoid use of assertObjectHasAttribute()
Browse files Browse the repository at this point in the history
Use isset() to avoid the PHPUnit deprecation warnings. This is
the same as on the master branch.
  • Loading branch information
nikic committed Sep 21, 2024
1 parent 103f95d commit 2041245
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/PhpParser/NodeAbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public function testConstruct(array $attributes, Node $node) {
$this->assertSame('/** doc comment */', $node->getDocComment()->getText());
$this->assertSame('value1', $node->subNode1);
$this->assertSame('value2', $node->subNode2);
$this->assertObjectHasAttribute('subNode1', $node);
$this->assertObjectHasAttribute('subNode2', $node);
$this->assertObjectNotHasAttribute('subNode3', $node);
$this->assertTrue(isset($node->subNode1));
$this->assertTrue(isset($node->subNode2));
$this->assertTrue(!isset($node->subNode3));
$this->assertSame($attributes, $node->getAttributes());
$this->assertSame($attributes['comments'], $node->getComments());

Expand Down

0 comments on commit 2041245

Please sign in to comment.