<?php

class LoginTest extends WebTestCase
{

	public function testIndex()
	{
		$this->open('');
		$this->assertTextPresent('Login');
    $this->assertElementPresent('//input[@name="LoginForm[username]"]');
    $this->assertElementPresent('//input[@name="LoginForm[password]"]');
	}

  public function testSuccessfullLogin()
  {
    parent::loginAsAdmin();
    $this->assertTextPresent('Logout');
  }

  public function testSuccessfullLogout()
  {
    parent::loginAsAdmin();
    $this->clickAndWait('link=Logout');
    $this->assertTextPresent('Login');
  }

}
