Passed
Push — master ( edcd19...7b8e38 )
by Felipe
05:02
created

VariablesTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 50
rs 10
c 0
b 0
f 0
wmc 3
1
<?php
2
/**
3
 * Function area     : Database.
4
 * Sub Function area : Variables.
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
 * This class is to test the Variables about phpPgAdmin implementation.
18
 */
19
class VariablesTest extends PreconditionSet 
20
{
21
    /**
22
     * Set up the preconditon.
23
     */
24
    function setUp()
25
    {
26
        global $webUrl;
27
        global $SUPER_USER_NAME;
28
        global $SUPER_USER_PASSWORD;
29
30
        $this->login($SUPER_USER_NAME, $SUPER_USER_PASSWORD,
31
            "$webUrl/login.php");
32
            
33
        return TRUE;
34
    } 
35
36
37
    /**
38
     * Release the relational resource.
39
     */
40
    function tearDown()
41
    {
42
        // Logout this system.
43
        $this->logout();
44
45
        return TRUE;
46
    }
47
48
    
49
    /**
50
     * TestCaseId: DVA001
51
     * This test is used to display the list of Prcesses.
52
     */
53
    function testVariablesList()
54
    {
55
        global $webUrl;
56
        global $lang, $SERVER, $DATABASE;
57
58
		$this->assertTrue($this->get("$webUrl/database.php", array(
59
			            'server' => $SERVER,
60
						'database' => $DATABASE,
61
						'subject' => 'database',
62
						'action' => 'variables'))
63
					);
64
        
65
        $this->assertWantedText($lang['strname']);
66
        $this->assertWantedText($lang['strsetting']);
67
68
        return TRUE;
69
    }
70
}
71
72
?>
73