public function showBoard($board) { $board = $this->boardService->getBoard($board); if (!$board instanceof Models\Board) { $this->slim->response()->isNotFound(); } $threads = $this->threadService->getThreads($board); $this->slim->render('boards/display.phtml', ['board' => $board, 'threads' => $threads]); }
/** * @depends testCreateNewBoard * @param Models\Board $board * @return Models\Thread[] */ public function testCreateThreads(Models\Board $board) { $threads = []; for ($i = 1; $i <= 15; $i++) { $user = $this->randomBoardPoolUser(); $title = $this->faker->catchPhrase; $content = $this->faker->boolean(50) ? $this->faker->url : implode("\n\n", $this->faker->paragraphs(rand(1, 5))); $threads[$i] = $this->threadService->createThread($board, $user, $title, $content); } return $threads; }