Merge remote-tracking branch 'origin/master'

This commit is contained in:
Michal Čihař 2012-07-24 07:53:57 +02:00
commit 119d08b506
4 changed files with 49 additions and 5 deletions

View File

@ -32,6 +32,7 @@ class AllSeleniumTests
$suite->addTestSuite('PmaSeleniumLoginTest');
$suite->addTestSuite('PmaSeleniumXssTest');
$suite->addTestSuite('PmaSeleniumPrivilegesTest');
$suite->addTestSuite('PmaSeleniumCreateDropDatabaseTest');
return $suite;
}
}

View File

@ -263,7 +263,7 @@ class PMA_Types_MySQL_test extends PHPUnit_Framework_TestCase
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(
@ -398,9 +398,11 @@ class PMA_Types_MySQL_test extends PHPUnit_Framework_TestCase
'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',

View File

@ -30,8 +30,8 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
function PMA_DBI_fetch_result()
{
return array(
'id' => 'id',
'label' => 'label'
'table1',
'table2'
);
}
}
@ -68,8 +68,8 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
public function testPMA_Bookmark_getList(){
$this->assertEquals(
array(
'id' => 'id (shared)',
'label' => 'label (shared)'
0 => 'table1 (shared)',
1 => 'table2 (shared)'
),
PMA_Bookmark_getList('phpmyadmin')
);

View File

@ -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']");
}
}