count(10)->create(); $this->expectException(NotEnoughCardsException::class); new GameBoard(new GameBoardState(5, 5)); } public function test_exception_is_not_thrown_if_there_is_enough_cards_to_fill_it() { Card::factory()->count(32)->create(); $board = new GameBoard(new GameBoardState(4, 4)); $this->assertSame(16, $board->getSize()); } }