Skip to content

Commit

Permalink
WRTC
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Aug 27, 2022
1 parent 868d7dc commit 0994173
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Models/Configs.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public function scopeAdmin(FixedQueryBuilder $query): FixedQueryBuilder
/**
* Reset the cache.
*/
public static function dropCache(): void
public static function invalidateCache(): void
{
self::$cache = [];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function up(): void
$user = User::query()->findOrNew(0);
$user->incrementing = false; // disable auto-generation of ID
$user->id = 0;
Configs::dropCache();
Configs::invalidateCache();
$user->username = Configs::getValueAsString('username', '');
$user->password = Configs::getValueAsString('password', '');
$user->save();
Expand Down
4 changes: 1 addition & 3 deletions tests/Feature/InstallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public function testInstall(): void
* Clearing things up. We could do an Artisan migrate but this is more efficient.
*/

Schema::disableForeignKeyConstraints();
$tables = [
'sym_links',
'size_variants',
Expand Down Expand Up @@ -80,7 +79,6 @@ public function testInstall(): void
foreach ($tables as $table) {
Schema::dropIfExists($table);
}
Schema::enableForeignKeyConstraints();

/**
* No database: we should be redirected to install: default case.
Expand Down Expand Up @@ -142,7 +140,7 @@ public function testInstall(): void
/**
* We now should NOT be redirected.
*/
Configs::dropCache();
Configs::invalidateCache();
$response = $this->get('/');
$response->assertOk();

Expand Down

0 comments on commit 0994173

Please sign in to comment.