Skip to content

Commit 9618e3d

Browse files
committed
Merge branch 'refs/heads/github-actions-support-20240625'
2 parents 3800c75 + 0cbe123 commit 9618e3d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/WebServiceTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ class WebServiceTest extends TestCase
1111
{
1212
public function testCredit() {
1313
$ws = new \IP2Location\WebService('demo', 'WS24', true);
14-
$this->assertMatchesRegularExpression('/^[0-9]+$/', (string) $ws->getCredit());
14+
if (method_exists($this, 'assertMatchesRegularExpression')) {
15+
$this->assertMatchesRegularExpression('/^[0-9]+$/', (string) $ws->getCredit());
16+
}else{
17+
// Compatible with php 7.2 && phpunit 8.x
18+
$this->assertRegExp('/^[0-9]+$/', (string) $ws->getCredit());
19+
}
1520
}
1621

1722
public function testCountryCode() {

0 commit comments

Comments
 (0)