Ignore:
Timestamp:
Jun 5, 2006 2:34:47 AM (18 years ago)
Author:
scdev
Message:

Q - while we're changing interfaces I'm going to change ->clearAuth() to ->clear().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/Auth_SQLTest.php

    r136 r149  
    6767    }
    6868
    69     function test_setval()
    70     {
    71         $this->Auth_SQL->setval('testuserkey', 'testuserval');
     69    function test_set()
     70    {
     71        $this->Auth_SQL->set('testuserkey', 'testuserval');
    7272        $this->assertEquals('testuserval', $_SESSION[$this->Auth_SQL->_ns]['user_data']['testuserkey']);
    7373    }
    7474
    75     function test_getval()
     75    function test_get()
    7676    {
    7777        $_SESSION[$this->Auth_SQL->_ns]['user_data']['testuserkey'] = 'testuserval';
    78         $val = $this->Auth_SQL->getVal('testuserkey');
     78        $val = $this->Auth_SQL->get('testuserkey');
    7979        $this->assertEquals('testuserval', $val);
    8080    }
     
    9595    }
    9696
    97     function test_clearauth()
     97    function test_clear()
    9898    {
    9999        $login = $this->Auth_SQL->login('testuser', 'testpass');
     
    101101        $before_logged_in = $this->Auth_SQL->isloggedin();
    102102        $this->assertTrue($before_logged_in, 'User is not logged in, but should be.');
    103         $this->Auth_SQL->clearauth();
     103        $this->Auth_SQL->clear();
    104104        $after_logged_in = $this->Auth_SQL->isloggedin();
    105105        $this->assertFalse($after_logged_in, 'User is still logged in but should not be.');
     
    123123        $before_logged_in = $this->Auth_SQL->isloggedin();
    124124        $this->assertTrue($before_logged_in, '2. User is not logged in, but should be.');
    125         $this->Auth_SQL->clearauth();
     125        $this->Auth_SQL->clear();
    126126        $after_logged_in = $this->Auth_SQL->isloggedin();
    127127        $this->assertFalse($after_logged_in, '3. User is still logged in but should not be.');
     
    132132        $before_logged_in2 = $this->Auth_SQL->isloggedin();
    133133        $this->assertFalse($before_logged_in2, '5. User is logged in, but should not be.');
    134         $this->Auth_SQL->clearauth();
     134        $this->Auth_SQL->clear();
    135135        $after_logged_in2 = $this->Auth_SQL->isloggedin();
    136136        $this->assertFalse($after_logged_in2, '6. Wrong user is still logged in but should not be.');
Note: See TracChangeset for help on using the changeset viewer.