/** * Tests the add tournament method. */ public function testAddTournamentAdditionSuccess() { $admin = Factory::create('App\\Models\\Administrator'); $tournament = $this->repository->addTournament($admin, 'tournament name', \Carbon\Carbon::now(), \Carbon\Carbon::now(), false); $this->assertNotNull($tournament); $this->assertInstanceOf('App\\Models\\Tournament', $tournament); $this->seeInDatabase('tournaments', ['name' => $tournament->name, 'begin' => $tournament->begin, 'finish' => $tournament->finish, 'has_ended' => $tournament->has_ended]); }