All pastes #465314 Raw Edit

Nicolas Connault

public php v1 · immutable
#465314 ·published 2007-04-30 02:02 UTC
rendered paste body
class TestOfSecurity extends UnitTestCase {    function testNoMultipleLoginsFromSameUser() {        $first = &new SimpleBrowser();        $first->get('http://my-site.com/login.php');        $first->setField('name', 'Me');        $first->setField('password', 'Secret');        $first->click('Enter');        $this->assertEqual($first->getTitle(), 'Welcome');                $second = &new SimpleBrowser();        $second->get('http://my-site.com/login.php');        $second->setField('name', 'Me');        $second->setField('password', 'Secret');        $second->click('Enter');        $this->assertEqual($second->getTitle(), 'Access Denied');    }}