Skip to content

Commit b82b84d

Browse files
committed
GotoLabelTest: work round removal of assertInternalType()
The `assertInternalType()` method was deprecated in PHPUnit 7.5.0 and removed in PHPUnit 9.0.0. PHPUnit 7.5.0 introduced dedicated `assertIs*()` (like `assertIsInt()`) methods as a replacement. As this is only a simple check in these two tests, a PHPUnit feature based toggle seems over the top, so I'm just replacing the assertion with an alternative which will work PHPUnit cross-version.
1 parent 7e14b7f commit b82b84d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Core/Tokenizer/GotoLabelTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testGotoStatement($testMarker, $testContent)
3232

3333
$label = $this->getTargetToken($testMarker, T_STRING);
3434

35-
$this->assertInternalType('int', $label);
35+
$this->assertTrue(is_int($label));
3636
$this->assertSame($testContent, $tokens[$label]['content']);
3737

3838
}//end testGotoStatement()
@@ -78,7 +78,7 @@ public function testGotoDeclaration($testMarker, $testContent)
7878

7979
$label = $this->getTargetToken($testMarker, T_GOTO_LABEL);
8080

81-
$this->assertInternalType('int', $label);
81+
$this->assertTrue(is_int($label));
8282
$this->assertSame($testContent, $tokens[$label]['content']);
8383

8484
}//end testGotoDeclaration()

0 commit comments

Comments
 (0)