<?php require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../src/RockPaperScissors.php'; $app = new Silex\Application(); $app->register(new Silex\Provider\TwigServiceProvider(), array('twig.path' => __DIR__ . '/../views')); //Routes $app->get("/", function () use($app) { return $app['twig']->render('home.html.twig'); }); $app->get("/results", function () use($app) { $new_RockPaperScissors = new RockPaperScissors(); $results_array = $new_RockPaperScissors->matchResults($_GET['player_one_weapon']); return $app['twig']->render('results.html.twig', array('results' => $results_array)); }); return $app;
function test_mixedCase() { //Arrange $test_RockPaperScissors = new RockPaperScissors(); $player_one = "PapEr"; $player_two = "pAper"; //Act $result = $test_RockPaperScissors->matchResults($player_one, $player_two); //Assert $this->assertEquals("tie", $result); }