function test_checkAngle_lessThanNegativeOneEighty() { //Arrange $test_Clock = new Clock(); $input1 = 1; $input2 = 57; //Act $result = $test_Clock->checkAngle($input1, $input2); //Assert $this->assertEquals(76.5, $result); }
<?php require_once __DIR__ . "/../vendor/autoload.php"; require_once __DIR__ . "/../src/Clock.php"; $app = new Silex\Application(); $app->register(new Silex\Provider\TwigServiceProvider(), array('twig.path' => __DIR__ . '/../views')); $app->get("/", function () use($app) { return $app['twig']->render('form.html.twig'); }); $app->get("/view_angle", function () use($app) { $my_Clock = new Clock(); $check_angle = $my_Clock->checkAngle($_GET['hour'], $_GET['minute']); return $app['twig']->render('clock_results.html.twig', array('result' => $check_angle)); }); return $app;