<p>We will only test the Game object here, but you can use this code to help test the other objects.</p> <p>Assuming your database is setup properly, let\'s add an object. We will assume we received parameters from a form to add a game.</p> <div class="well"> $params = [<br> \'opponent\' => \'Collier\',<br> \'location\' => \'Internet\',<br> \'outcome\' => \'L\',<br> \'datetime\' => \'2015-12-07 12:00:00\',<br> ];<br><br> $game = GameController::add($params);<br><br> $id = $game->id;<br> $game = GameController::display($id);<br> </div> '; $params = ['opponent' => 'Collier', 'location' => 'Internet', 'outcome' => 'L', 'datetime' => '2015-12-07 12:00:00']; $game = GameController::add($params); $id = $game->id; $game = GameController::display($id); $test_data .= '<div class="bg-success pad">'; foreach ($game as $key => $value) { $test_data .= $key . ' : ' . $value . '<br>'; } $test_data .= '</div>'; $test_data .= '<br> <p>Next, we\'ll edit the game we just added.</p> <div class="well"> $game = new Game();<br><br> $params = [<br> \'opponent\' => \'John\',<br> \'location\' => \'Outside\',<br>