Skip to content

Commit

Permalink
test for overriding with onQueue() and onConnection()
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmastech committed Jan 20, 2025
1 parent 15a9de7 commit 25432a9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Integration/Bus/BusPendingDispatchWithAttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@ public function testWorksWithDispatchFunction(): void
&& $job->value === 'laravel'
);
}

public function testIgnoresAttributesWhenCallingOnQueueAndOnConnection(): void
{
Queue::fake();

FakeJobWithAttributesUsingEnums::dispatch(76543)
->onQueue('called-onQueue')
->onConnection('called-onConnection');

Queue::assertPushed(
fn (FakeJobWithAttributesUsingEnums $job) => $job->queue === 'called-onQueue'
&& $job->connection == 'called-onConnection'
&& $job->value === 76543
);
}
}

#[OnQueue('queue-from-attribute')]
Expand Down

0 comments on commit 25432a9

Please sign in to comment.