Fix tests

This commit is contained in:
Philipp Holzer 2019-07-26 15:54:14 +02:00
parent 2a87464c97
commit 07aaf292ec
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
12 changed files with 134 additions and 144 deletions

View file

@ -3,7 +3,7 @@
namespace Friendica\Test\src\Core\Cache;
use Friendica\Core\Cache\IMemoryCacheDriver;
use Friendica\Core\Logger;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
abstract class MemoryCacheTest extends CacheTest
@ -15,9 +15,13 @@ abstract class MemoryCacheTest extends CacheTest
protected function setUp()
{
Logger::init(new NullLogger());
parent::setUp();
$logger = new NullLogger();
$this->dice->shouldReceive('create')
->with(LoggerInterface::class)
->andReturn($logger);
if (!($this->instance instanceof IMemoryCacheDriver)) {
throw new \Exception('MemoryCacheTest unsupported');
}