We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3800c75 + 0cbe123 commit 9618e3dCopy full SHA for 9618e3d
tests/WebServiceTest.php
@@ -11,7 +11,12 @@ class WebServiceTest extends TestCase
11
{
12
public function testCredit() {
13
$ws = new \IP2Location\WebService('demo', 'WS24', true);
14
- $this->assertMatchesRegularExpression('/^[0-9]+$/', (string) $ws->getCredit());
+ 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
+ }
20
}
21
22
public function testCountryCode() {
0 commit comments