Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rawilk committed Oct 14, 2024
1 parent 14c3f52 commit 36057ab
Show file tree
Hide file tree
Showing 132 changed files with 3,676 additions and 1,989 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.3, 8.2]
laravel: [11.*, 10.*]
php: [8.3]
laravel: [11.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}

Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@
"livewire/livewire": "^3.1.0",
"nunomaduro/collision": "^8.0",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.25",
"pestphp/pest-plugin-arch": "^2.4",
"pestphp/pest-plugin-laravel": "^2.2",
"pestphp/pest-plugin-livewire": "^2.1",
"pestphp/pest": "^3.0",
"pestphp/pest-plugin-laravel": "^3.0",
"pestphp/pest-plugin-livewire": "^3.0",
"sinnbeck/laravel-dom-assertions": "^1.3",
"spatie/laravel-ray": "^1.31"
},
Expand Down
16 changes: 12 additions & 4 deletions database/factories/WebauthnKeyFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,32 @@ public function definition(): array
'credential_id' => Str::random(10),
'attachment_type' => Arr::random(['platform', 'cross-platform']),
'is_passkey' => false,
'public_key' => FakeWebauthn::publicKey(),
'public_key' => json_encode((array) FakeWebauthn::publicKeyCredentialSource()),
];
}

public function notPasskey(): self
public function notPasskey(): static
{
return $this->state(['is_passkey' => false]);
}

public function upgradeableToPasskey(): self
public function upgradeableToPasskey(): static
{
return $this->state([
'is_passkey' => false,
'attachment_type' => 'platform',
]);
}

public function passkey(): self
public function notUpgradeableToPasskey(): static
{
return $this->state([
'is_passkey' => false,
'attachment_type' => 'cross-platform',
]);
}

public function passkey(): static
{
return $this->state([
'is_passkey' => true,
Expand Down
Loading

0 comments on commit 36057ab

Please sign in to comment.