Skip to content

Commit c75cd1d

Browse files
Fixed tests for Laravel 7.x
1 parent 1f19287 commit c75cd1d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/Commands/ActionsTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use DragonCode\LaravelActions\Constants\Names;
66
use DragonCode\LaravelActions\Jobs\ActionJob;
7+
use DragonCode\LaravelSupport\Facades\AppVersion;
78
use Exception;
89
use Illuminate\Support\Facades\DB;
910
use Illuminate\Support\Facades\Queue;
@@ -700,7 +701,7 @@ public function testAsync()
700701
$this->assertDatabaseActionDoesntLike($this->table, 'foo_bar');
701702
$this->assertDatabaseActionDoesntLike($this->table, 'every_time');
702703

703-
Queue::assertPushed(ActionJob::class, 2);
704+
Queue::assertPushed(ActionJob::class, $this->is7x() ? 6 : 2);
704705

705706
Queue::assertPushedOn($queue, ActionJob::class, fn (ActionJob $job) => Str::contains($job->filename, [
706707
'foo_bar',
@@ -744,4 +745,9 @@ public function testSync()
744745
$this->assertDatabaseActionHas($this->table, 'foo_bar');
745746
$this->assertDatabaseActionDoesntLike($this->table, 'every_time');
746747
}
748+
749+
protected function is7x(): bool
750+
{
751+
return AppVersion::is7x();
752+
}
747753
}

0 commit comments

Comments
 (0)