Skip to content

Commit

Permalink
accept a command in object form in Bus::assertChained (#36031)
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid authored Jan 25, 2021
1 parent b7c6055 commit 0ea96b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Illuminate/Support/Testing/Fakes/BusFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ public function assertChained(array $expectedChain)

if ($command instanceof Closure) {
[$command, $callback] = [$this->firstClosureParameterType($command), $command];
} elseif (! is_string($command)) {
$command = get_class($command);
}

PHPUnit::assertTrue(
Expand Down

0 comments on commit 0ea96b4

Please sign in to comment.