diff --git a/src/Illuminate/Support/Testing/Fakes/BusFake.php b/src/Illuminate/Support/Testing/Fakes/BusFake.php index 090a74309dbd..6061344730d8 100644 --- a/src/Illuminate/Support/Testing/Fakes/BusFake.php +++ b/src/Illuminate/Support/Testing/Fakes/BusFake.php @@ -341,11 +341,6 @@ public function assertChained(array $expectedChain) "The expected [{$command}] job was not dispatched." ); - PHPUnit::assertTrue( - collect($expectedChain)->isNotEmpty(), - 'The expected chain can not be empty.' - ); - $this->isChainOfObjects($expectedChain) ? $this->assertDispatchedWithChainOfObjects($command, $expectedChain, $callback) : $this->assertDispatchedWithChainOfClasses($command, $expectedChain, $callback); diff --git a/tests/Support/SupportTestingBusFakeTest.php b/tests/Support/SupportTestingBusFakeTest.php index cc23b62b824f..4ea6cdd9b19d 100644 --- a/tests/Support/SupportTestingBusFakeTest.php +++ b/tests/Support/SupportTestingBusFakeTest.php @@ -466,6 +466,14 @@ public function testAssertNothingDispatched() public function testAssertChained() { + $this->fake->chain([ + new ChainedJobStub, + ])->dispatch(); + + $this->fake->assertChained([ + ChainedJobStub::class, + ]); + $this->fake->chain([ new ChainedJobStub, new OtherBusJobStub,