Skip to content

Commit

Permalink
Merge pull request #1094 from kenjis/fix-test-DB-config
Browse files Browse the repository at this point in the history
test: fix Registrar for DB Config
  • Loading branch information
kenjis authored Apr 14, 2024
2 parents cf646b8 + ed2e21b commit 112d44b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/Authentication/HasHmacTokensTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ public function testHmacTokens(): void
// Give the user a couple of access tokens
$token1 = fake(
UserIdentityModel::class,
['user_id' => $this->user->id, 'type' => 'hmac_sha256', 'secret' => 'key1', 'secret2' => 'd862cd9ddc23e960ca6d45a3e0b64c7509f0c0ef0e5f7b64be8910a6a714c89b83fab95251bbf17f6c84b42c26cf460a28ea969591dc64b1f5c4b323f47615d2e8cbe4c62118001d3274e0f25850b0ac2617bc43119af22c99a1a83072002267177da01f9f37225435e1914be004f4d35a49869b737ed10ab232c1ed1048bb96ef6fb70979dc9c981e17134f4356a938']
['user_id' => $this->user->id, 'type' => 'hmac_sha256', 'secret' => 'key1', 'secret2' => 'd862cd9ddc23e960ca6d45a3e0b64c7509f0c0ef0e5f7b64be8910a6a714c89b83fab95251bbf17f6c84b42c26cf460a28ea969591dc64b1f5c4b323f47615d2e8cbe4c62118001d3274e0f25850b0ac2617bc43119af22c99a1a83072002267177da01f9f37225435e1914be004f4d35a49869b737ed10ab232c1ed1048bb9']
);

$token2 = fake(
UserIdentityModel::class,
['user_id' => $this->user->id, 'type' => 'hmac_sha256', 'secret' => 'key2', 'secret2' => 'd862cd9ddc23e960ca6d45a3e0b64c7509f0c0ef0e5f7b64be8910a6a714c89b83fab95251bbf17f6c84b42c26cf460a28ea969591dc64b1f5c4b323f47615d2e8cbe4c62118001d3274e0f25850b0ac2617bc43119af22c99a1a83072002267177da01f9f37225435e1914be004f4d35a49869b737ed10ab232c1ed1048bb96ef6fb70979dc9c981e17134f4356a938']
['user_id' => $this->user->id, 'type' => 'hmac_sha256', 'secret' => 'key2', 'secret2' => 'd862cd9ddc23e960ca6d45a3e0b64c7509f0c0ef0e5f7b64be8910a6a714c89b83fab95251bbf17f6c84b42c26cf460a28ea969591dc64b1f5c4b323f47615d2e8cbe4c62118001d3274e0f25850b0ac2617bc43119af22c99a1a83072002267177da01f9f37225435e1914be004f4d35a49869b737ed10ab232c1ed1048bb9']
);

$tokens = $this->user->hmacTokens();
Expand Down
2 changes: 1 addition & 1 deletion tests/_support/Config/Registrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static function Database()

// Under GitHub Actions, we can set an ENV var named 'DB'
// so that we can test against multiple databases.
if (($group = getenv('DB')) && ! isset(self::$dbConfig[$group])) {
if (($group = getenv('DB')) && isset(self::$dbConfig[$group])) {
$config['tests'] = self::$dbConfig[$group];
}

Expand Down

0 comments on commit 112d44b

Please sign in to comment.