We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff940aa commit 0cbe123Copy full SHA for 0cbe123
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