summaryrefslogtreecommitdiff
path: root/tests/Selenium/Login.php
blob: 65b082851fc3df8841140a1046f5a98f03f45248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

class Selenium_Login extends Selenium_Test
{
    protected function setUp()
    {
        bootstrap::init_db();
        parent::setUp();
    }

    public function testLogin()
    {
        // first test, we're already on the login page
        $this->url(TESTS_URL);

        // task should be set to 'login'
        $env = $this->get_env();
        $this->assertEquals('login', $env['task']);

        // test valid login
        $this->login();

        // task should be set to 'mail' now
        $env = $this->get_env();
        $this->assertEquals('mail', $env['task']);
    }
}