Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-11-14 03:26:03 +0300
committerThomas Steur <thomas.steur@googlemail.com>2014-11-14 03:26:03 +0300
commite66c3d52a9e9564374d65732d19a2cec5d65bf2e (patch)
tree58c8837df6390c6567c0705222cba0fb5ee6f118 /tests/PHPUnit/System/TrackerTest.php
parent03d1687c49860afbf7aa056d983c442d5f0203b5 (diff)
refs #6661 also return a HTTP 400 in case there is another invalid request param
Diffstat (limited to 'tests/PHPUnit/System/TrackerTest.php')
-rwxr-xr-xtests/PHPUnit/System/TrackerTest.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/PHPUnit/System/TrackerTest.php b/tests/PHPUnit/System/TrackerTest.php
index baba28e763..84f5db3aac 100755
--- a/tests/PHPUnit/System/TrackerTest.php
+++ b/tests/PHPUnit/System/TrackerTest.php
@@ -85,4 +85,13 @@ class TrackerTest extends SystemTestCase
$this->assertResponseCode(400, $url);
}
+ public function test_response_ShouldSend400ResponseCode_IfInvalidRequestParameterIsGiven()
+ {
+ $url = $this->tracker->getUrlTrackPageView('Test');
+ $url .= '&cid=' . str_pad('1', 16, '1');
+
+ $this->assertResponseCode(200, $url);
+ $this->assertResponseCode(400, $url . '1'); // has to be 16 char, but is 17 now
+ }
+
}