diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/TestCase.php | 8 | ||||
| -rw-r--r-- | tests/app/TreeTest.php | 1 |
2 files changed, 3 insertions, 6 deletions
diff --git a/tests/TestCase.php b/tests/TestCase.php index a168a1e0c7..29dca090ea 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -31,7 +31,7 @@ use Fisharebest\Webtrees\Services\MigrationService; use Fisharebest\Webtrees\Services\ModuleService; use Fisharebest\Webtrees\Services\TimeoutService; use Fisharebest\Webtrees\Services\UserService; -use Illuminate\Cache\ArrayStore; +use Illuminate\Cache\NullStore; use Illuminate\Cache\Repository; use Illuminate\Database\Capsule\Manager as DB; use Illuminate\Database\Query\Builder; @@ -81,8 +81,8 @@ class TestCase extends \PHPUnit\Framework\TestCase app()->bind(UploadedFileFactoryInterface::class, Psr17Factory::class); app()->bind(UriFactoryInterface::class, Psr17Factory::class); - // Use an array cache for database calls, etc. - app()->instance('cache.array', new Repository(new ArrayStore())); + // Disable the cache. + app()->instance('cache.array', new Repository(new NullStore())); app()->instance(UserService::class, new UserService()); app()->instance(FilesystemInterface::class, new Filesystem(new MemoryAdapter())); @@ -204,8 +204,6 @@ class TestCase extends \PHPUnit\Framework\TestCase DB::connection()->rollBack(); } - app('cache.array')->flush(); - Site::$preferences = []; Tree::$trees = []; GedcomRecord::$gedcom_record_cache = null; diff --git a/tests/app/TreeTest.php b/tests/app/TreeTest.php index 867a932551..ba9da62981 100644 --- a/tests/app/TreeTest.php +++ b/tests/app/TreeTest.php @@ -301,7 +301,6 @@ class TreeTest extends TestCase Site::setPreference('DEFAULT_GEDCOM', $tree->name()); $tree_service->delete($tree); - app('cache.array')->flush(); $this->assertNull($tree_service->findByName('demo.ged')); $this->assertSame('', Site::getPreference('DEFAULT_GEDCOM')); |
