aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <zelent.marcin@gmail.com>2017-12-01 11:06:41 +0100
committermarcinzelent <zelent.marcin@gmail.com>2017-12-01 11:06:41 +0100
commit8b8639740c08633728f0d9dd778ac022e43f7e1b (patch)
treed8f087a875416d7feb05f53ec459aacdfd12c47d /tests/AppBundle/Controller
parent7d09b3a6201a175128421d117d4c63495813fa05 (diff)
parent8c514c01aa4d620aea084beca3f4808270671f7e (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'tests/AppBundle/Controller')
-rw-r--r--tests/AppBundle/Controller/MathControllerTest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/AppBundle/Controller/MathControllerTest.php b/tests/AppBundle/Controller/MathControllerTest.php
new file mode 100644
index 0000000..523f9e5
--- /dev/null
+++ b/tests/AppBundle/Controller/MathControllerTest.php
@@ -0,0 +1,19 @@
+<?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