Replace expectExceptionMessageRegExp() with expectExceptionMessageMatches()

This commit is contained in:
Philipp 2021-05-23 23:09:49 +02:00
parent 280d0ee961
commit dda817cad8
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
5 changed files with 11 additions and 11 deletions

View file

@ -128,7 +128,7 @@ class StreamLoggerTest extends AbstractLoggerTest
public function testWrongUrl()
{
$this->expectException(\UnexpectedValueException::class);
$this->expectExceptionMessageRegExp("/The stream or file .* could not be opened: .* /");
$this->expectExceptionMessageMatches("/The stream or file .* could not be opened: .* /");
$logfile = vfsStream::newFile('friendica.log')
->at($this->root)->chmod(0);
@ -144,7 +144,7 @@ class StreamLoggerTest extends AbstractLoggerTest
public function testWrongDir()
{
$this->expectException(\UnexpectedValueException::class);
$this->expectExceptionMessageRegExp("/Directory .* cannot get created: .* /");
$this->expectExceptionMessageMatches("/Directory .* cannot get created: .* /");
static::markTestIncomplete('We need a platform independent way to set directory to readonly');
@ -159,7 +159,7 @@ class StreamLoggerTest extends AbstractLoggerTest
public function testWrongMinimumLevel()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessageRegExp("/The level \".*\" is not valid./");
$this->expectExceptionMessageMatches("/The level \".*\" is not valid./");
$logger = new StreamLogger('test', 'file.text', $this->introspection, $this->fileSystem, 'NOPE');
}
@ -170,7 +170,7 @@ class StreamLoggerTest extends AbstractLoggerTest
public function testWrongLogLevel()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessageRegExp("/The level \".*\" is not valid./");
$this->expectExceptionMessageMatches("/The level \".*\" is not valid./");
$logfile = vfsStream::newFile('friendica.log')
->at($this->root);