Fix a lot of notices/warnings/deprecation notes in the test directory

This commit is contained in:
Philipp 2020-10-18 20:31:57 +02:00
parent efaec26b1d
commit d55ecb9288
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
77 changed files with 428 additions and 558 deletions

View file

@ -34,6 +34,7 @@ use Friendica\Factory\ConfigFactory;
use Friendica\Model\Config\Config;
use Friendica\Model\Storage;
use Friendica\Core\Session;
use Friendica\Model\Storage\StorageException;
use Friendica\Test\DatabaseTest;
use Friendica\Test\Util\Database\StaticDatabase;
use Friendica\Test\Util\VFSTrait;
@ -56,7 +57,7 @@ class StorageManagerTest extends DatabaseTest
use VFSTrait;
public function setUp()
protected function setUp()
{
parent::setUp();
@ -319,12 +320,12 @@ class StorageManagerTest extends DatabaseTest
/**
* Test moving data to a WRONG storage
*
* @expectedException \Friendica\Model\Storage\StorageException
* @expectedExceptionMessage Can't move to storage backend 'SystemResource'
*/
public function testMoveStorageWrong()
{
$this->expectExceptionMessage("Can't move to storage backend 'SystemResource'");
$this->expectException(StorageException::class);
$storageManager = new StorageManager($this->dba, $this->config, $this->logger, $this->l10n);
$storage = $storageManager->getByName(Storage\SystemResource::getName());
$storageManager->move($storage);