Changeset 149 for trunk/tests


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().

Location:
trunk/tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/Auth_FileTest.php

    r136 r149  
    4848    }
    4949
    50     function test_clearauth()
     50    function test_clear()
    5151    {
    5252        $result = $this->Auth_File->login('testuser', 'testpass');
    53         $this->Auth_File->clearauth();
     53        $this->Auth_File->clear();
    5454        $this->assertFalse($_SESSION[$this->Auth_File->_ns]['authenticated'], 'testuser authentication not false in session.');
    5555    }
     
    6161        $this->assertTrue($true, 'testuser not logged in but should be.');
    6262
    63         $this->Auth_File->clearauth();
     63        $this->Auth_File->clear();
    6464        $false = $this->Auth_File->isloggedin();
    6565        $this->assertFalse($false, 'testuser is logged in but shouldn\'t be.');
  • 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.');
  • trunk/tests/PrefsTest.php

    r42 r149  
    4848    }
    4949
    50     function test_getvalue()
     50    function test_getue()
    5151    {
    52         $result = $this->Prefs->getvalue(PARAM);
     52        $result = $this->Prefs->getue(PARAM);
    5353        $expected = EXPECTED_VAL;
    5454        $this->assertEquals($expected, $result);
Note: See TracChangeset for help on using the changeset viewer.