function testAllowMultipleHits() { $this->markTestSkipped("As of 2013-09-30, this test is broken. Skipping it for now."); $lib = new AuthTokens($this->db, array('maxHits' => 100)); $token = $lib->createToken('tiki-index.php', array('page' => 'HomePage'), array('Registered'), array('hits' => 3)); $lib->getGroups($token['token'], 'tiki-index.php', array('page' => 'HomePage')); $lib->getGroups($token['token'], 'tiki-index.php', array('page' => 'HomePage')); $this->assertEquals(array('Registered'), $lib->getGroups($token['token'], 'tiki-index.php', array('page' => 'HomePage'))); $this->assertNull($lib->getGroups($token['token'], 'tiki-index.php', array('page' => 'HomePage'))); }
function testAllowMultipleHits() { $lib = new AuthTokens($this->db, array('maxHits' => 100)); $token = $lib->createToken('tiki-index.php', array('page' => 'HomePage'), array('Registered'), array('hits' => 3)); $lib->getGroups($token['token'], 'tiki-index.php', array('page' => 'HomePage')); $lib->getGroups($token['token'], 'tiki-index.php', array('page' => 'HomePage')); $this->assertEquals(array('Registered'), $lib->getGroups($token['token'], 'tiki-index.php', array('page' => 'HomePage'))); $this->assertNull($lib->getGroups($token['token'], 'tiki-index.php', array('page' => 'HomePage'))); }