Fix deprecated method in tests

This commit is contained in:
Jeremy Benoist
2020-06-15 13:37:50 +02:00
parent 7332d1f4e5
commit 732ec8a2eb
44 changed files with 314 additions and 326 deletions

View File

@ -91,7 +91,7 @@ class InstapaperImportTest extends TestCase
->expects($this->once())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return $persistedEntry->isArchived();
return (bool) $persistedEntry->isArchived();
}));
$res = $instapaperImport->setMarkAsRead(true)->import();
@ -191,7 +191,7 @@ class InstapaperImportTest extends TestCase
$this->assertFalse($res);
$records = $this->logHandler->getRecords();
$this->assertContains('InstapaperImport: unable to read file', $records[0]['message']);
$this->assertStringContainsString('InstapaperImport: unable to read file', $records[0]['message']);
$this->assertSame('ERROR', $records[0]['level_name']);
}
@ -205,7 +205,7 @@ class InstapaperImportTest extends TestCase
$this->assertFalse($res);
$records = $this->logHandler->getRecords();
$this->assertContains('InstapaperImport: user is not defined', $records[0]['message']);
$this->assertStringContainsString('InstapaperImport: user is not defined', $records[0]['message']);
$this->assertSame('ERROR', $records[0]['level_name']);
}