Passed
Pull Request — develop (#92)
by Felipe
04:56
created

LanguageTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 48
rs 10
c 0
b 0
f 0
wmc 3
1
<?php
2
/**
3
 * Function area     : Database.
4
 * Sub Function area : Language.
5
 * 
6
 * @author     Augmentum SpikeSource Team
7
 * @copyright  Copyright (c) 2005 by Augmentum, Inc.
8
 */
9
10
// Import the precondition class.
11
if (is_dir('../Public'))
12
{
13
    require_once('../Public/SetPrecondition.php');
14
}
15
16
17
/**
18
 * This class is to test the Language displayed list.
19
 */
20
class LanguageTest extends PreconditionSet
21
{
22
    /**
23
     * Set up the preconditon.
24
     */
25
    function setUp()
26
    {
27
        global $webUrl;
28
        global $SUPER_USER_NAME;
29
        global $SUPER_USER_PASSWORD;
30
31
        $this->login($SUPER_USER_NAME, $SUPER_USER_PASSWORD,
32
                     "$webUrl/login.php");
33
34
        return TRUE;
35
    }
36
37
38
    /**
39
     * Release the relational resource.
40
     */
41
    function tearDown()
42
    {
43
        // Logout this system.
44
        $this->logout();
45
46
        return TRUE;
47
    }
48
49
50
    /**
51
     * TestCaseId: DLD001
52
     * This test is used to test Language Displayed page.
53
     */
54
    function testLanguage()
55
    {
56
		global $webUrl, $SERVER, $DATABASE;
57
58
        // Locate the list page of language.
59
		$this->assertTrue($this->get("$webUrl/languages.php", array(
60
			            'server' => $SERVER,
61
						'database' => $DATABASE,
62
						'subject' => 'database'))
63
					);
64
65
        $this->assertWantedPattern('/sql/');
66
67
        return TRUE;
68
    }
69
}
70
71
?>
72