WebTestCase('Issue Assurance Tests'); } function testAssurance() { $this->get('http://' . BASE_URL); $this->assertWantedPattern('/Login/'); $this->clickLink('Normal Login'); // Password Login $this->assertWantedPattern('/Pass Phrase:/'); $this->setField('email', ADMIN_USER); $this->setField('pword', ADMIN_USER_PW); $this->clickSubmit('Login'); $this->assertWantedPattern('/Logout/'); // Okay we are in as an admin user $this->clickLink('+ CAcert Web of Trust'); $this->assertWantedPattern('/Assure Someone/'); $this->clickLink('Assure Someone'); $this->assertWantedPattern('/wot.php/'); // Select the user $this->setField('email', NORMAL_USER1); $this->clickSubmit('Next'); $this->assertWantedPattern('/Assurance Confirmation/'); // Miss some of the checkboxes $this->setField('certify', '1'); $this->clickSubmit('I am sure of myself'); $this->assertWantedPattern('/ERROR: You failed to check all boxes/'); // Now do it right $this->setField('location', 'Never-Never Land'); $this->setField('assertion', '1'); $this->setField('rules', '1'); $this->setField('points', '10'); $this->clickSubmit('I am sure of myself'); $this->assertWantedPattern('/Shortly you and the person/'); } } ?>