From 6756ef2301a5f624941b947ec9effd34b467de9a Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 25 Oct 2015 15:05:19 -0400 Subject: Move token generation to Security namespace --- tests/units/Core/Security/TokenTest.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/units/Core/Security/TokenTest.php (limited to 'tests/units/Core') diff --git a/tests/units/Core/Security/TokenTest.php b/tests/units/Core/Security/TokenTest.php new file mode 100644 index 00000000..dbb7bd1a --- /dev/null +++ b/tests/units/Core/Security/TokenTest.php @@ -0,0 +1,29 @@ +assertNotEmpty($t1); + $this->assertNotEmpty($t2); + + $this->assertNotEquals($t1, $t2); + } + + public function testCSRFTokens() + { + $token = new Token($this->container); + $t1 = $token->getCSRFToken(); + + $this->assertNotEmpty($t1); + $this->assertTrue($token->validateCSRFToken($t1)); + $this->assertFalse($token->validateCSRFToken($t1)); + } +} -- cgit v1.2.3