mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
try and fix phpunit deprecation warning - assertRegExp => assertMatchesRegularExpression
This commit is contained in:
parent
f01274ec94
commit
2eb7f34844
@ -10,7 +10,7 @@ class CheckDomainTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
$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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ class CreatePageBrowserTest extends \PHPUnit\Framework\TestCase
|
||||
$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);
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ class PaCryptTest extends \PHPUnit\Framework\TestCase
|
||||
|
||||
$this->assertEquals($enc, _pacrypt_php_crypt($password, $enc));
|
||||
|
||||
$this->assertRegExp('/^\{SHA256-CRYPT\}/', $enc);
|
||||
$this->assertMatchesRegularExpression('/^\{SHA256-CRYPT\}/', $enc);
|
||||
$this->assertGreaterThan(20, strlen($enc));
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ class PaCryptTest extends \PHPUnit\Framework\TestCase
|
||||
|
||||
$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));
|
||||
|
Loading…
Reference in New Issue
Block a user