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>2019-09-04 02:26:13 +0300
committerGitHub <noreply@github.com>2019-09-04 02:26:13 +0300
commitdf3e73a54336e6435f757a55bf8e0840ee4bc94e (patch)
tree62b18a52bc42f2c632d4ed4386a5c3faa767439b /tests/PHPUnit/Unit
parente84f89fd7207fbb5eac7782e0e1affa0a48b3462 (diff)
fix build failing tracker request test (#14850)
Diffstat (limited to 'tests/PHPUnit/Unit')
-rw-r--r--tests/PHPUnit/Unit/Tracker/RequestTest.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/PHPUnit/Unit/Tracker/RequestTest.php b/tests/PHPUnit/Unit/Tracker/RequestTest.php
index af076274d8..81eded4f3b 100644
--- a/tests/PHPUnit/Unit/Tracker/RequestTest.php
+++ b/tests/PHPUnit/Unit/Tracker/RequestTest.php
@@ -37,44 +37,6 @@ class RequestTest extends UnitTestCase
$this->request = $this->buildRequest(array('idsite' => '1'));
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Custom timestamp is 86500 seconds old
- */
- public function test_cdt_ShouldNotTrackTheRequest_IfNotAuthenticatedAndTimestampIsNotRecent()
- {
- $request = $this->buildRequest(array('cdt' => '' . $this->time - 86500));
- $this->assertSame($this->time, $request->getCurrentTimestamp());
- }
-
- public function test_cdt_ShouldReturnTheCustomTimestamp_IfNotAuthenticatedButTimestampIsRecent()
- {
- $request = $this->buildRequest(array('cdt' => '' . ($this->time - 5)));
-
- $this->assertSame('' . ($this->time - 5), $request->getCurrentTimestamp());
- }
-
- public function test_cdt_ShouldReturnTheCustomTimestamp_IfAuthenticatedAndValid()
- {
- $request = $this->buildRequest(array('cdt' => '' . ($this->time - 86500)));
- $request->setIsAuthenticated();
- $this->assertSame('' . ($this->time - 86500), $request->getCurrentTimestamp());
- }
-
- public function test_cdt_ShouldReturnTheCustomTimestamp_IfTimestampIsInFuture()
- {
- $request = $this->buildRequest(array('cdt' => '' . ($this->time + 30800)));
- $this->assertSame($this->time, $request->getCurrentTimestamp());
- }
-
- public function test_cdt_ShouldReturnTheCustomTimestamp_ShouldUseStrToTime_IfItIsNotATime()
- {
- $request = $this->buildRequest(array('cdt' => '5 years ago'));
- $request->setIsAuthenticated();
- $this->assertNotSame($this->time, $request->getCurrentTimestamp());
- $this->assertNotEmpty($request->getCurrentTimestamp());
- }
-
public function test_getCurrentTimestamp_ShouldReturnTheSetTimestamp_IfNoCustomValueGiven()
{
$this->assertSame($this->time, $this->request->getCurrentTimestamp());