Skip to content

Commit 31f3733

Browse files
committed
test for overriding with onQueue() and onConnection()
1 parent 15a9de7 commit 31f3733

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/Integration/Bus/BusPendingDispatchWithAttributesTest.php

+15
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,21 @@ public function testWorksWithDispatchFunction(): void
9191
&& $job->value === 'laravel'
9292
);
9393
}
94+
95+
public function testIgnoresAttributesWhenCallingOnQueueAndOnConnection(): void
96+
{
97+
Queue::fake();
98+
99+
FakeJobWithAttributesUsingEnums::dispatch(76543)
100+
->onQueue('called-onQueue')
101+
->onConnection('called-onConnection');
102+
103+
Queue::assertPushed(
104+
fn (FakeJobWithAttributesUsingEnums $job) => $job->queue === 'called-onQueue'
105+
&& $job->connection == 'called-onConnection'
106+
&& $job->value === 76543
107+
);
108+
}
94109
}
95110

96111
#[OnQueue('queue-from-attribute')]

0 commit comments

Comments
 (0)