login($SUPER_USER_NAME, $SUPER_USER_PASSWORD, "$webUrl/login.php"); return TRUE; } /** * Release the relational resource. */ function tearDown() { // Logout this system. $this->logout(); return TRUE; } /** * TestCaseId:DCD001; * This test is used to test help links. * * Note: It's strange here, because all the links are outside. * So the Pattern cannot be invoked directly. */ function testHelpWithInnerSchema() { global $webUrl; global $lang, $SERVER, $DATABASE; // Locate the list page of database. $this->assertTrue($this->get("$webUrl/database.php", array( 'server' => $SERVER, 'database' => $DATABASE, 'subject' => 'database')) ); // Click the link about help. $this->assertTrue($this->get("$webUrl/help.php")); $this->assertTrue($this->get("$webUrl/help.php?help=pg.schema")); $this->assertTrue($this->get("$webUrl/help.php?help=pg.column.add")); // Comment this for avoiding error by Xdebug. // Because we cannot assert something about the content of the page via // hyperlink outside // $this->assertWantedPattern('/"Schemas"/'); return TRUE; } /** * TestCaseId:DCD002; * This test is used to test help links from the index links. */ function testHelpWithInrClk() { global $webUrl, $SERVER, $DATABASE; // Locate the list page of language. $this->assertTrue($this->get("$webUrl/database.php", array( 'server' => $SERVER, 'database' => $DATABASE, 'subject' => 'database')) ); $this->assertTrue($this->get("$webUrl/help.php", array('server' => $SERVER))); // XXX fail because of the version number in the URL $this->assertTrue($this->clickLink(/*'http://www.postgresql.org/docs/8.0/' .*/ 'interactive/sql-expressions.html' . '#SQL-SYNTAX-TYPE-CASTS')); return TRUE; } } ?>