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 <tsteur@users.noreply.github.com>2018-11-25 16:33:08 +0300
committerStefan Giehl <stefan@piwik.org>2018-11-25 16:33:08 +0300
commit2862316a05301755681305fbe060591c08d8c265 (patch)
tree84c2cf594a139f743f2dfee58ebd8175522e64d3 /tests/PHPUnit/Unit
parent762b6fa5ffba9f8d6f769f2bb8715b35be10cc4b (diff)
Always fail during tracking when authentication is required but invalid token is used (#13675)
* Always fail during tracking when authentication is required but invalid token used * fix tests
Diffstat (limited to 'tests/PHPUnit/Unit')
-rw-r--r--tests/PHPUnit/Unit/Tracker/RequestTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/PHPUnit/Unit/Tracker/RequestTest.php b/tests/PHPUnit/Unit/Tracker/RequestTest.php
index 43f8a1bc7f..be05e8a1bf 100644
--- a/tests/PHPUnit/Unit/Tracker/RequestTest.php
+++ b/tests/PHPUnit/Unit/Tracker/RequestTest.php
@@ -9,6 +9,7 @@
namespace Piwik\Tests\Unit\Tracker;
use Piwik\Cookie;
+use Piwik\Exception\InvalidRequestParameterException;
use Piwik\Network\IPUtils;
use Piwik\Piwik;
use Piwik\Plugins\CustomVariables\CustomVariables;
@@ -524,6 +525,10 @@ class RequestTest extends UnitTestCase
$this->assertEquals($_SERVER['REMOTE_ADDR'], $this->request->getIpString());
}
+ /**
+ * @expectedException \Piwik\Exception\InvalidRequestParameterException
+ * @expectedException requires valid token_auth
+ */
public function test_getIpString_ShouldDefaultToServerAddress_IfCustomIpIsSetButNotAuthenticated()
{
$request = $this->buildRequest(array('cip' => '192.192.192.192'));