- /**
- * Test is_session_id_valid with a valid ID - TEST ALL THE HASHES!
- *
- * This tests extensively covers all hash algorithms / bit representations
- */
- public function testIsAnyHashSessionIdValid()
- {
- foreach (self::$sidHashes as $algo => $bpcs) {
- foreach ($bpcs as $bpc => $hash) {
- $this->assertTrue(is_session_id_valid($hash));
- }
- }
- }
-
- /**
- * Test is_session_id_valid with a valid ID - SHA-1 hashes
- */
- public function testIsSha1SessionIdValid()
- {
- $this->assertTrue(is_session_id_valid(sha1('shaarli')));
- }
-
- /**
- * Test is_session_id_valid with a valid ID - SHA-256 hashes
- */
- public function testIsSha256SessionIdValid()
- {
- $this->assertTrue(is_session_id_valid(hash('sha256', 'shaarli')));
- }
-
- /**
- * Test is_session_id_valid with a valid ID - SHA-512 hashes
- */
- public function testIsSha512SessionIdValid()
- {
- $this->assertTrue(is_session_id_valid(hash('sha512', 'shaarli')));
- }