public function testGetRandomRestaurantArround() { $resto_manager = new RestaurantManager(43.6249627, 1.4304408); $list_restos = $resto_manager->getAllRestaurantsAround(1); $this->assertEquals(1, count($list_restos)); }
<link href="bootstrap-slider-master/css/bootstrap-slider.css" rel="stylesheet"> <link href="bootstrap-slider-master/dependencies/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.css"> <link href='https://fonts.googleapis.com/css?family=Fredoka+One' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Cookie' rel='stylesheet' type='text/css'> <link href="style.css" rel="stylesheet" media="all" type="text/css"> <title>Resto Aléatoire</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <?php try { //include '../Methods/ParseMethods.php'; include '../Methods/RestaurantManager.php'; $restauManager = new RestaurantManager($_POST['lattitude'], $_POST['longitude']); $restau = $restauManager->getRandomRestaurantArround(intval($_POST['km'])); } catch (Exexption $e) { echo $e; } ?> <div class="container"> <div class="row"> <div class="col-xs-12"> <?php if ($restau == null) { echo "<h3 class=\"restoInfo\">Pas de restau !</h3>"; } else { ?>