Skip to content

Commit

Permalink
try and fix phpunit deprecation warning - assertRegExp => assertMatch…
Browse files Browse the repository at this point in the history
…esRegularExpression
  • Loading branch information
DavidGoodwin committed Apr 22, 2024
1 parent f01274e commit 2eb7f34
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/CheckDomainTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function testBasic()
{
$this->assertEquals('', check_domain('example.com'));
$this->assertEquals('', check_domain('google.com'));
$this->assertRegExp('/ not discoverable in DNS/', check_domain('fishbeansblahblahblah' . uniqid() . '.com'));
$this->assertMatchesRegularExpression('/ not discoverable in DNS/', check_domain('fishbeansblahblahblah' . uniqid() . '.com'));
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/CheckEmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CheckEmailTest extends \PHPUnit\Framework\TestCase
public function testBasic()
{
$this->assertEquals('', check_email('test@example.com'));
$this->assertRegExp('/ not discoverable in DNS/', check_email('test@fishbeansblahblahblah' . uniqid() . '.com'));
$this->assertMatchesRegularExpression('/ not discoverable in DNS/', check_email('test@fishbeansblahblahblah' . uniqid() . '.com'));
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/CreatePageBrowserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function testBasic()
$b = create_page_browser('mailbox.username', 'FROM mailbox WHERE 1 = 1');
$this->assertEquals(10, sizeof($b));
foreach ($b as $range) {
$this->assertRegExp('/[\w]{2}\-[\w]{2}/', $range);
$this->assertMatchesRegularExpression('/[\w]{2}\-[\w]{2}/', $range);
}
$this->assertNotEmpty($b);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/PacryptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function testPhpCryptHandlesPrefixAndOrRounds()

$this->assertEquals($enc, _pacrypt_php_crypt($password, $enc));

$this->assertRegExp('/^\{SHA256-CRYPT\}/', $enc);
$this->assertMatchesRegularExpression('/^\{SHA256-CRYPT\}/', $enc);
$this->assertGreaterThan(20, strlen($enc));
}

Expand Down Expand Up @@ -303,7 +303,7 @@ public function testSha512B64SupportsMd5CryptMigration()

$x = pacrypt('test123');

$this->assertRegExp('/^\{SHA512-CRYPT\.B64/', $x);
$this->assertMatchesRegularExpression('/^\{SHA512-CRYPT\.B64/', $x);
$this->assertTrue(strlen($x) > 50);

$this->assertEquals($x, pacrypt('test123', $x));
Expand Down

0 comments on commit 2eb7f34

Please sign in to comment.