Skip to content

Commit

Permalink
Fix Capsules test
Browse files Browse the repository at this point in the history
  • Loading branch information
driftingly committed Jan 18, 2024
1 parent bcff48c commit 16914aa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/integration/Capsules/CapsulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,10 @@ public function makeCapsule()
public function selectCapsule()
{
foreach ($this->capsules as $capsule) {
$class = Str::studly($capsule);
$migrationDeclared = collect(get_declared_classes())
->contains(fn($class) => Str::contains($class, "create_{$capsule}_tables"));

$class = "Create{$class}Tables";

if (! collect(get_declared_classes())->contains($class)) {
if (! $migrationDeclared) {
$this->capsuleName = $capsule;

break;
Expand Down

0 comments on commit 16914aa

Please sign in to comment.