Skip to content

Commit 5c95790

Browse files
addOption method test coverage
1 parent cc9bf73 commit 5c95790

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/Bus/BusPendingBatchTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ public function test_pending_batch_may_be_configured_and_dispatched()
4141
//
4242
})->catch(function () {
4343
//
44-
})->allowFailures()->onConnection('test-connection')->onQueue('test-queue');
44+
})->allowFailures()->onConnection('test-connection')->onQueue('test-queue')->addOption('extra-option', 123);
4545

4646
$this->assertSame('test-connection', $pendingBatch->connection());
4747
$this->assertSame('test-queue', $pendingBatch->queue());
4848
$this->assertCount(1, $pendingBatch->thenCallbacks());
4949
$this->assertCount(1, $pendingBatch->catchCallbacks());
50+
$this->assertArrayHasKey('extra-option', $pendingBatch->options);
51+
$this->assertSame(123, $pendingBatch->options['extra-option']);
5052

5153
$repository = m::mock(BatchRepository::class);
5254
$repository->shouldReceive('store')->once()->with($pendingBatch)->andReturn($batch = m::mock(stdClass::class));

0 commit comments

Comments
 (0)