[TESTS] Fix a couple of issues from last changes

This commit is contained in:
2022-03-14 18:33:47 +00:00
parent 888c3798b7
commit 20f690c532
94 changed files with 176 additions and 160 deletions

View File

@@ -21,15 +21,15 @@ declare(strict_types = 1);
// }}}
namespace App\Tests\Core;
namespace App\Test\Core;
use App\Core\Cache;
use App\Util\Common;
use App\Util\GNUsocialTestCase;
use ReflectionClass;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface;
class CacheTest extends KernelTestCase
class CacheTest extends GNUsocialTestCase
{
private function doTest(array $adapters, $result_pool, $throws = null, $recompute = \INF)
{
@@ -38,7 +38,7 @@ class CacheTest extends KernelTestCase
// Setup Common::config to have the values in $conf
$conf = ['cache' => ['adapters' => $adapters, 'early_recompute' => $recompute]];
$cb = $this->createMock(ContainerBagInterface::class);
static::assertTrue($cb instanceof ContainerBagInterface);
static::assertInstanceOf(ContainerBagInterface::class, $cb);
$cb->method('get')
->willReturnMap([['gnusocial', $conf], ['gnusocial_defaults', $conf]]);
Common::setupConfig($cb);