diff options
author | William Desportes <williamdes@wdes.fr> | 2020-05-23 20:47:55 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2020-06-10 02:27:22 +0300 |
commit | e2de21292a4ba1a7e0cec220fa61c23312ba16d5 (patch) | |
tree | 12a659f51968e526bbb1cdcf69e08bb6b483063e /test/selenium | |
parent | e95e055af0573d4e09a619fc64dc48c12d3a9b4c (diff) |
Fix more queries
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test/selenium')
-rw-r--r-- | test/selenium/Database/QueryByExampleTest.php | 9 | ||||
-rw-r--r-- | test/selenium/ExportTest.php | 11 | ||||
-rw-r--r-- | test/selenium/NormalizationTest.php | 5 | ||||
-rw-r--r-- | test/selenium/SqlQueryTest.php | 9 | ||||
-rw-r--r-- | test/selenium/Table/BrowseTest.php | 11 | ||||
-rw-r--r-- | test/selenium/Table/InsertTest.php | 5 | ||||
-rw-r--r-- | test/selenium/TrackingTest.php | 15 |
7 files changed, 30 insertions, 35 deletions
diff --git a/test/selenium/Database/QueryByExampleTest.php b/test/selenium/Database/QueryByExampleTest.php index f4a1f8a5ea..e798a0043f 100644 --- a/test/selenium/Database/QueryByExampleTest.php +++ b/test/selenium/Database/QueryByExampleTest.php @@ -25,14 +25,13 @@ class QueryByExampleTest extends TestBase parent::setUp(); $this->dbQuery( - 'CREATE TABLE `test_table` (' + 'USE `' . $this->database_name . '`;' + . 'CREATE TABLE `test_table` (' . ' `id` int(11) NOT NULL AUTO_INCREMENT,' . ' `val` int(11) NOT NULL,' . ' PRIMARY KEY (`id`)' - . ')' - ); - $this->dbQuery( - 'INSERT INTO `test_table` (val) VALUES (2), (6), (5), (3), (4), (4), (5);' + . ');' + . 'INSERT INTO `test_table` (val) VALUES (2), (6), (5), (3), (4), (4), (5);' ); $this->login(); diff --git a/test/selenium/ExportTest.php b/test/selenium/ExportTest.php index ebe6948510..173f1368aa 100644 --- a/test/selenium/ExportTest.php +++ b/test/selenium/ExportTest.php @@ -21,14 +21,13 @@ class ExportTest extends TestBase { parent::setUp(); $this->dbQuery( - 'CREATE TABLE `test_table` (' + 'USE `' . $this->database_name . '`;' + . 'CREATE TABLE `test_table` (' . ' `id` int(11) NOT NULL AUTO_INCREMENT,' . ' `val` int(11) NOT NULL,' . ' PRIMARY KEY (`id`)' - . ')' - ); - $this->dbQuery( - 'INSERT INTO `test_table` (val) VALUES (2);' + . ');' + . 'INSERT INTO `test_table` (val) VALUES (2);' ); $this->login(); @@ -83,7 +82,7 @@ class ExportTest extends TestBase */ public function testTableExport($plugin, $expected): void { - $this->dbQuery('INSERT INTO `test_table` (val) VALUES (3);'); + $this->dbQuery('INSERT INTO `' . $this->database_name . '`.`test_table` (val) VALUES (3);'); $this->navigateTable('test_table'); diff --git a/test/selenium/NormalizationTest.php b/test/selenium/NormalizationTest.php index 363f23314a..6335c66966 100644 --- a/test/selenium/NormalizationTest.php +++ b/test/selenium/NormalizationTest.php @@ -21,12 +21,13 @@ class NormalizationTest extends TestBase { parent::setUp(); $this->dbQuery( - 'CREATE TABLE `test_table` (' + 'USE `' . $this->database_name . '`;' + . 'CREATE TABLE `test_table` (' . ' `id` int(11) NOT NULL AUTO_INCREMENT,' . ' `val` int(11) NOT NULL,' . ' `val2` varchar(64) NOT NULL,' . 'PRIMARY KEY(id)' - . ')' + . ');' ); $this->login(); diff --git a/test/selenium/SqlQueryTest.php b/test/selenium/SqlQueryTest.php index 030d734405..2e934f70a0 100644 --- a/test/selenium/SqlQueryTest.php +++ b/test/selenium/SqlQueryTest.php @@ -22,14 +22,13 @@ class SqlQueryTest extends TestBase parent::setUp(); $this->dbQuery( - 'CREATE TABLE `test_table` (' + 'USE `' . $this->database_name . '`;' + . 'CREATE TABLE `test_table` (' . ' `id` int(11) NOT NULL AUTO_INCREMENT,' . ' `val` int(11) NOT NULL,' . ' PRIMARY KEY (`id`)' - . ')' - ); - $this->dbQuery( - 'INSERT INTO `test_table` (val) VALUES (2), (3), (4), (5);' + . ');' + . 'INSERT INTO `test_table` (val) VALUES (2), (3), (4), (5);' ); $this->login(); } diff --git a/test/selenium/Table/BrowseTest.php b/test/selenium/Table/BrowseTest.php index 7c98bbd28d..011e810852 100644 --- a/test/selenium/Table/BrowseTest.php +++ b/test/selenium/Table/BrowseTest.php @@ -24,18 +24,17 @@ class BrowseTest extends TestBase { parent::setUp(); $this->dbQuery( - 'CREATE TABLE `test_table` (' + 'USE `' . $this->database_name . '`;' + . 'CREATE TABLE `test_table` (' . ' `id` int(11) NOT NULL AUTO_INCREMENT,' . ' `name` varchar(20) NOT NULL,' . ' `datetimefield` datetime NOT NULL,' . ' PRIMARY KEY (`id`)' - . ')' - ); - $this->dbQuery( - 'INSERT INTO `test_table` (`id`, `name`, `datetimefield`) VALUES' + . ');' + . 'INSERT INTO `test_table` (`id`, `name`, `datetimefield`) VALUES' . " (1, 'abcd', '2011-01-20 02:00:02')," . " (2, 'foo', '2010-01-20 02:00:02')," - . " (3, 'Abcd', '2012-01-20 02:00:02')" + . " (3, 'Abcd', '2012-01-20 02:00:02');" ); $this->login(); diff --git a/test/selenium/Table/InsertTest.php b/test/selenium/Table/InsertTest.php index bdc4ef39be..8ad916ef2f 100644 --- a/test/selenium/Table/InsertTest.php +++ b/test/selenium/Table/InsertTest.php @@ -24,12 +24,13 @@ class InsertTest extends TestBase { parent::setUp(); $this->dbQuery( - 'CREATE TABLE `test_table` (' + 'USE `' . $this->database_name . '`;' + . 'CREATE TABLE `test_table` (' . ' `id` int(11) NOT NULL AUTO_INCREMENT,' . ' `name` varchar(20) NOT NULL,' . ' `datetimefield` datetime NOT NULL,' . ' PRIMARY KEY (`id`)' - . ')' + . ');' ); $this->login(); diff --git a/test/selenium/TrackingTest.php b/test/selenium/TrackingTest.php index 984513f85c..543c648853 100644 --- a/test/selenium/TrackingTest.php +++ b/test/selenium/TrackingTest.php @@ -21,21 +21,18 @@ class TrackingTest extends TestBase { parent::setUp(); $this->dbQuery( - 'CREATE TABLE `test_table` (' + 'USE `' . $this->database_name . '`;' + . 'CREATE TABLE `test_table` (' . ' `id` int(11) NOT NULL AUTO_INCREMENT,' . ' `val` int(11) NOT NULL,' . ' PRIMARY KEY (`id`)' - . ')' - ); - $this->dbQuery( - 'CREATE TABLE `test_table_2` (' + . ');' + . 'CREATE TABLE `test_table_2` (' . ' `id` int(11) NOT NULL AUTO_INCREMENT,' . ' `val` int(11) NOT NULL,' . ' PRIMARY KEY (`id`)' - . ')' - ); - $this->dbQuery( - 'INSERT INTO `test_table` (val) VALUES (2), (3);' + . ');' + . 'INSERT INTO `test_table` (val) VALUES (2), (3);' ); $this->login(); |