Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Jul 24, 2012
2 parents 464b4c2 + 7dcad7d commit 119d08b
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 5 deletions.
1 change: 1 addition & 0 deletions test/AllSeleniumTests.php
Expand Up @@ -32,6 +32,7 @@ public static function suite()
$suite->addTestSuite('PmaSeleniumLoginTest');
$suite->addTestSuite('PmaSeleniumXssTest');
$suite->addTestSuite('PmaSeleniumPrivilegesTest');
$suite->addTestSuite('PmaSeleniumCreateDropDatabaseTest');
return $suite;
}
}
Expand Down
4 changes: 3 additions & 1 deletion test/classes/PMA_Types_MySQL_test.php
Expand Up @@ -263,7 +263,7 @@ public function providerFortTestGetTypeClass(){
public function testGetFunctionsClass($class, $output){

if (! defined('PMA_MYSQL_INT_VERSION')) {
define('PMA_MYSQL_INT_VERSION', 50000);
define('PMA_MYSQL_INT_VERSION', 60000);
}

$this->assertEquals(
Expand Down Expand Up @@ -398,9 +398,11 @@ public function providerFortTestGetFunctionsClass(){
'39' => 'SQRT',
'40' => 'TAN',
'41' => 'TO_DAYS',
'42' => 'TO_SECONDS',
'43' => 'TIME_TO_SEC',
'44' => 'UNCOMPRESSED_LENGTH',
'45' => 'UNIX_TIMESTAMP',
'46' => 'UUID_SHORT',
'47' => 'WEEK',
'48' => 'WEEKDAY',
'49' => 'WEEKOFYEAR',
Expand Down
8 changes: 4 additions & 4 deletions test/libraries/PMA_bookmark_test.php
Expand Up @@ -30,8 +30,8 @@ function PMA_getRelationsParam()
function PMA_DBI_fetch_result()
{
return array(
'id' => 'id',
'label' => 'label'
'table1',
'table2'
);
}
}
Expand Down Expand Up @@ -68,8 +68,8 @@ public function testPMA_Bookmark_getParams(){
public function testPMA_Bookmark_getList(){
$this->assertEquals(
array(
'id' => 'id (shared)',
'label' => 'label (shared)'
0 => 'table1 (shared)',
1 => 'table2 (shared)'
),
PMA_Bookmark_getList('phpmyadmin')
);
Expand Down
41 changes: 41 additions & 0 deletions test/selenium/PmaSeleniumCreateDropDatabaseTest.php
@@ -0,0 +1,41 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Selenium TestCase for login related tests
*
* @package PhpMyAdmin-test
* @subpackage Selenium
*/
require_once 'PmaSeleniumTestCase.php';
require_once 'Helper.php';

class PmaSeleniumCreateDropDatabaseTest extends PHPUnit_Extensions_SeleniumTestCase
{

public function setUp()
{
$helper = new Helper();
$this->setBrowser(Helper::getBrowserString());
$this->setBrowserUrl(TESTSUITE_PHPMYADMIN_HOST . TESTSUITE_PHPMYADMIN_URL);
}

public function testCreateDropDatabase()
{
$log = new PmaSeleniumTestCase($this);
$log->login(TESTSUITE_USER, TESTSUITE_PASSWORD);
$this->selectFrame("frame_content");
$this->click("link=Databases");
$this->waitForPageToLoad("30000");
$this->type("id=text_create_db", "pma");
$this->click("id=buttonGo");
$this->assertTrue($this->isTextPresent("pma"));

$this->click("link=pma");
$this->waitForPageToLoad("30000");
$this->click("link=Operations");
$this->waitForPageToLoad("30000");
$this->click("id=drop_db_anchor");
$this->click("//button[@type='button']");

}
}

0 comments on commit 119d08b

Please sign in to comment.