public function testMissingDirPermissions()
{
$this->expectException(StorageException::class);
- $this->expectExceptionMessageRegExp("/Filesystem storage failed to create \".*\". Check you write permissions./");
+ $this->expectExceptionMessageMatches("/Filesystem storage failed to create \".*\". Check you write permissions./");
$this->root->getChild('storage')->chmod(000);
$instance = $this->getInstance();
static::markTestIncomplete("Cannot catch file_put_content() error due vfsStream failure");
$this->expectException(StorageException::class);
- $this->expectExceptionMessageRegExp("/Filesystem storage failed to save data to \".*\". Check your write permissions/");
+ $this->expectExceptionMessageMatches("/Filesystem storage failed to save data to \".*\". Check your write permissions/");
vfsStream::create(['storage' => ['f0' => ['c0' => ['k0i0' => '']]]], $this->root);
public function testFailedBasePath()
{
$this->expectException(\Exception::class);
- $this->expectExceptionMessageRegExp("/(.*) is not a valid basepath/");
+ $this->expectExceptionMessageMatches("/(.*) is not a valid basepath/");
$basepath = new BasePath('/now23452sgfgas', []);
$basepath->getPath();
*/
public function testLoadConfigWrong()
{
- $this->expectExceptionMessageRegExp("/Error loading config file \w+/");
+ $this->expectExceptionMessageMatches("/Error loading config file \w+/");
$this->expectException(\Exception::class);
$this->delConfigFile('local.config.php');
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);
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');
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');
}
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);
public function testWrongMinimumLevel()
{
$this->expectException(\InvalidArgumentException::class);
- $this->expectExceptionMessageRegExp("/The level \".*\" is not valid./");
+ $this->expectExceptionMessageMatches("/The level \".*\" is not valid./");
$logger = new SyslogLoggerWrapper('test', $this->introspection, 'NOPE');
}
public function testWrongLogLevel()
{
$this->expectException(\InvalidArgumentException::class);
- $this->expectExceptionMessageRegExp("/The level \".*\" is not valid./");
+ $this->expectExceptionMessageMatches("/The level \".*\" is not valid./");
$logger = new SyslogLoggerWrapper('test', $this->introspection);
{
if (PHP_MAJOR_VERSION < 8) {
$this->expectException(\UnexpectedValueException::class);
- $this->expectExceptionMessageRegExp("/Can\'t open syslog for ident \".*\" and facility \".*\": .* /");
+ $this->expectExceptionMessageMatches("/Can\'t open syslog for ident \".*\" and facility \".*\": .* /");
} else {
$this->expectException(\TypeError::class);
$this->expectExceptionMessage("openlog(): Argument #3 (\$facility) must be of type int, string given");