Skip to content

Commit

Permalink
Poor man's test reset
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Nov 14, 2024
1 parent 2821900 commit 747a5d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/JobExecutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class JobExecutionTest extends TestCase
/** @test */
public function it_can_find_and_entry_by_tracking_id()
{
JobExecution::ofJobClass(SampleTrackableJob::class)->delete();

$job = new SampleTrackableJob(new SampleTask());
$job->generateJobTrackingId();
JobTracker::createFor($job);
Expand All @@ -29,6 +31,8 @@ public function it_can_find_and_entry_by_tracking_id()
/** @test */
public function it_can_return_the_entries_of_a_given_job_class()
{
JobExecution::ofJobClass(SampleTrackableJob::class)->delete();

foreach (range(1, 10) as $i) {
$job = new SampleTrackableJob(new SampleTask());
$job->generateJobTrackingId();
Expand All @@ -42,6 +46,8 @@ public function it_can_return_the_entries_of_a_given_job_class()
/** @test */
public function it_can_return_the_active_entries_of_a_given_job_class()
{
JobExecution::ofJobClass(SampleTrackableJob::class)->delete();

foreach (range(1, 4) as $i) {
$job = new SampleTrackableJob(new SampleTask(), JobStatus::COMPLETED());
$job->generateJobTrackingId();
Expand All @@ -65,6 +71,8 @@ public function it_can_return_the_active_entries_of_a_given_job_class()
/** @test */
public function it_can_return_the_entries_of_a_given_job_class_and_limit_the_record_count()
{
JobExecution::ofJobClass(SampleTrackableJob::class)->delete();

foreach (range(1, 10) as $i) {
$job = new SampleTrackableJob(new SampleTask());
$job->generateJobTrackingId();
Expand Down

0 comments on commit 747a5d6

Please sign in to comment.