- <?php
- class SimpleFormTests extends WebTestCase {
- function setUp() {
- ....
- }
- function tearDown() {
- ....
- }
- function testLogin() {
- $this->get('http://www.my-site.com/');
- $this->assertField('Username', 'username');
- $this->setField('Username', 'John');
- $this->assertField('Password', 'passsword');
- $this->setField('Password', '123456');
- $this->clickSubmit('Login');
- }
- }
- ?>