authors = new InMemoryAuthorRepository(); } //snippet setup-cheeps-repository /** @before */ final protected function makeCheepsRepository(): void { $this->cheeps = new InMemoryCheepRepository(); } //end-snippet /** @before */ final protected function makeFollowsRepository(): void { $this->follows = new InMemoryFollows(); } /** @before */ final protected function makeEventBus(): void { $this->eventBus = new InMemoryEventBus(); } //snippet post-new-cheep-tests private function postNewCheep(string $authorId, string $cheepId, string $message): void { (new PostCheepCommandHandler($this->authors, $this->cheeps, $this->eventBus))( PostCheepCommand::fromArray([ 'author_id' => $authorId, 'cheep_id' => $cheepId, 'message' => $message, ]) ); } //end-snippet }