Skip to content

Commit

Permalink
fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ksassnowski committed Mar 25, 2024
1 parent a0f10ed commit 6bf7cb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/VentureServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
$eventSubscriberMock = m::spy(WorkflowEventSubscriber::class);
app()->instance(WorkflowEventSubscriber::class, $eventSubscriberMock);
$jobMock = m::mock(Job::class);
$jobMock->allows('payload')->andReturnNull();

event(new JobProcessed('::connection::', $jobMock));
$eventSubscriberMock->shouldHaveReceived('handleJobProcessed');
Expand Down
8 changes: 4 additions & 4 deletions tests/WorkflowDefinitionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -510,28 +510,28 @@ public function definition(): WorkflowDefinition
assertEquals($expected, $definition->hasWorkflow(NestedWorkflow::class, $dependencies));
})->with([
'has workflow, ignore dependencies' => [
'configureWorkflow' => fn () => function (WorkflowDefinition $definition): void {
'configureWorkflow' => function (WorkflowDefinition $definition): void {
$definition->addWorkflow(new NestedWorkflow());
},
'dependencies' => null,
'expected' => true,
],
'does not have workflow, ignore dependencies' => [
'configureWorkflow' => fn () => function (WorkflowDefinition $definition): void {
'configureWorkflow' => function (WorkflowDefinition $definition): void {
},
'dependencies' => null,
'expected' => false,
],
'has workflow, incorrect dependencies' => [
'configureWorkflow' => fn () => function (WorkflowDefinition $definition): void {
'configureWorkflow' => function (WorkflowDefinition $definition): void {
$definition
->addWorkflow(new NestedWorkflow());
},
'dependencies' => [TestJob1::class],
'expected' => false,
],
'has workflow, correct dependencies' => [
'configureWorkflow' => fn () => function (WorkflowDefinition $definition): void {
'configureWorkflow' => function (WorkflowDefinition $definition): void {
$definition
->addJob(new TestJob1())
->addWorkflow(new NestedWorkflow(), [TestJob1::class]);
Expand Down

0 comments on commit 6bf7cb6

Please sign in to comment.