aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadify <boomkin1234@hotmail.com>2017-12-07 08:14:50 +0100
committerShadify <boomkin1234@hotmail.com>2017-12-07 08:14:50 +0100
commit8ca07955ad080f97713bdd6304cea6117be1bc52 (patch)
treeea9c2b69305f2bc41465a1a27f12ccfb53bbd522
parentd05922319749ae7d1354373a9bd062a0510d4f96 (diff)
Removed TestController
-rw-r--r--src/AppBundle/Controller/AllDataController.php3
-rw-r--r--src/AppBundle/Controller/HomeController.php1
-rw-r--r--tests/AppBundle/Controller/MathControllerTest.php19
3 files changed, 1 insertions, 22 deletions
diff --git a/src/AppBundle/Controller/AllDataController.php b/src/AppBundle/Controller/AllDataController.php
index 78b4752..86ec7c5 100644
--- a/src/AppBundle/Controller/AllDataController.php
+++ b/src/AppBundle/Controller/AllDataController.php
@@ -16,7 +16,7 @@ class AllDataController extends Controller
{
// Get cURL resource
$curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, "https://pollutometerapi.azurewebsites.net/api/Readings");
+ curl_setopt($curl, CURLOPT_URL, "https://pollutometerapi.azurewebsites.net/api/Readings/lastweek");
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json')); // Assuming you're requesting JSON
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Send the request & save response to $resp
@@ -40,6 +40,5 @@ class AllDataController extends Controller
return $this->render('default/AllDataPage.html.twig',$parametersToTwig);
-
}
} \ No newline at end of file
diff --git a/src/AppBundle/Controller/HomeController.php b/src/AppBundle/Controller/HomeController.php
index ca2043e..d84ab76 100644
--- a/src/AppBundle/Controller/HomeController.php
+++ b/src/AppBundle/Controller/HomeController.php
@@ -57,5 +57,4 @@ class HomeController extends Controller
return $this->render('default/index.html.twig', $data);
}
-
}
diff --git a/tests/AppBundle/Controller/MathControllerTest.php b/tests/AppBundle/Controller/MathControllerTest.php
deleted file mode 100644
index 523f9e5..0000000
--- a/tests/AppBundle/Controller/MathControllerTest.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-namespace Tests\AppBundle\Controller;
-
-use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
-
-class MathControllerTest extends WebTestCase
-{
- public function testAQIMath()
- {
- $CO = 1;
- $bpLowCO = 0;
- $bpHiCO = 4;
- $bpLowIndex = 0;
- $bpHiIndex = 50;
- $AQI = ((50 - 0)/(4 - 0))*(1-0)+0;
- $this->assertEquals(12.5, $AQI);
- }
-} \ No newline at end of file