Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFelipe Figueroa <amenadiel@gmail.com>2018-04-26 00:22:09 +0300
committerFelipe Figueroa <amenadiel@gmail.com>2018-04-26 00:22:09 +0300
commit1133c9a7fcd3eba0718f9c294714bc92d1d9e675 (patch)
treeab3a90ec729a4e84ed7feab56f86083aca44194c /tests
parent700b1e267642aeb5f8449d322b8c5bf7a75579bf (diff)
Moves statics to subfolder, transforms translation to classes
Diffstat (limited to 'tests')
-rw-r--r--tests/simpletest/config.tests.php2
-rw-r--r--tests/simpletest/testcase/Common/ExportTest.php20
-rw-r--r--tests/simpletest/testcase/Common/ImportTest.php14
-rw-r--r--tests/simpletest/testcase/Databases/AdminTest.php16
-rw-r--r--tests/simpletest/testcase/Databases/CastsTest.php2
-rw-r--r--tests/simpletest/testcase/Databases/DatabaseTest.php6
-rw-r--r--tests/simpletest/testcase/Databases/FindObjectsTest.php26
-rw-r--r--tests/simpletest/testcase/Databases/HelpTest.php6
-rw-r--r--tests/simpletest/testcase/Databases/LanguageTest.php2
-rw-r--r--tests/simpletest/testcase/Databases/ProcessesTest.php2
-rw-r--r--tests/simpletest/testcase/Databases/SchemaBasicTest.php18
-rw-r--r--tests/simpletest/testcase/Databases/SqlTest.php28
-rw-r--r--tests/simpletest/testcase/Databases/VariablesTest.php2
-rw-r--r--tests/simpletest/testcase/Public/SetPrecondition.php14
-rw-r--r--tests/simpletest/testcase/Schemas/AggregateTest.php12
-rw-r--r--tests/simpletest/testcase/Schemas/ConversionTest.php2
-rw-r--r--tests/simpletest/testcase/Schemas/DomainTest.php14
-rw-r--r--tests/simpletest/testcase/Schemas/FunctionTest.php12
-rw-r--r--tests/simpletest/testcase/Schemas/OpClassTest.php2
-rw-r--r--tests/simpletest/testcase/Schemas/OperatorTest.php12
-rw-r--r--tests/simpletest/testcase/Schemas/SequenceTest.php6
-rw-r--r--tests/simpletest/testcase/Schemas/TableTest.php38
-rw-r--r--tests/simpletest/testcase/Schemas/TypeTest.php10
-rw-r--r--tests/simpletest/testcase/Schemas/ViewTest.php20
-rw-r--r--tests/simpletest/testcase/Server/GroupsTest.php12
-rw-r--r--tests/simpletest/testcase/Server/TableSpacesTest.php14
-rw-r--r--tests/simpletest/testcase/Server/UsersTest.php10
-rw-r--r--tests/simpletest/testcase/Tables/ColumnTest.php22
-rw-r--r--tests/simpletest/testcase/Tables/ConstraintsTest.php16
-rw-r--r--tests/simpletest/testcase/Tables/DeadlockTest.php24
-rw-r--r--tests/simpletest/testcase/Tables/IndexesTest.php16
-rw-r--r--tests/simpletest/testcase/Tables/InfoTest.php10
-rw-r--r--tests/simpletest/testcase/Tables/RulesTest.php12
-rw-r--r--tests/simpletest/testcase/Tables/TriggersTest.php12
-rw-r--r--tests/simpletest/tests.php7
-rw-r--r--tests/unit/ViewTest.php133
-rw-r--r--tests/views/browser.php2
-rw-r--r--tests/views/intro.php2
-rw-r--r--tests/views/login.php2
-rw-r--r--tests/views/servers.php6
40 files changed, 269 insertions, 317 deletions
diff --git a/tests/simpletest/config.tests.php b/tests/simpletest/config.tests.php
index 92a6585d..eaf0c070 100644
--- a/tests/simpletest/config.tests.php
+++ b/tests/simpletest/config.tests.php
@@ -17,7 +17,7 @@ global $PHP_SIMPLETEST_HOME;
$webUrl = 'http://phppga.local';
$SERVER = sha1("{$conf['servers'][0]['host']}:{$conf['servers'][0]['port']}:{$conf['servers'][0]['sslmode']}");
$DATABASE = 'ppatests';
-$PHP_SIMPLETEST_HOME = dirname(dirname(__DIR__)) . '/vendor/simpletest/simpletest';
+$PHP_SIMPLETEST_HOME = dirname(dirname(__DIR__)).'/vendor/simpletest/simpletest';
$SUPER_USER_NAME = 'ppatests_super';
$SUPER_USER_PASSWORD = 'super';
diff --git a/tests/simpletest/testcase/Common/ExportTest.php b/tests/simpletest/testcase/Common/ExportTest.php
index 5b9ae392..eab6b2c3 100644
--- a/tests/simpletest/testcase/Common/ExportTest.php
+++ b/tests/simpletest/testcase/Common/ExportTest.php
@@ -47,7 +47,7 @@ class ExportTest extends PreconditionSet
$this->assertTrue(
$this->get("${webUrl}/alldb", [
'action' => 'export',
- 'server' => $SERVER])
+ 'server' => $SERVER, ])
);
// Enter information for exporting the data.
@@ -74,7 +74,7 @@ class ExportTest extends PreconditionSet
$this->assertTrue(
$this->get("${webUrl}/alldb", [
'action' => 'export',
- 'server' => $SERVER])
+ 'server' => $SERVER, ])
);
// Enter information for exporting the data.
@@ -103,7 +103,7 @@ class ExportTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'export'])
+ 'action' => 'export', ])
);
// Enter information for exporting the data.
@@ -132,7 +132,7 @@ class ExportTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'export'])
+ 'action' => 'export', ])
);
// Enter information for exporting the data.
@@ -165,7 +165,7 @@ class ExportTest extends PreconditionSet
'action' => 'confinsertrow',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set the value of the fields.
$this->assertTrue($this->setField('values[name]', 'testname'));
@@ -186,7 +186,7 @@ class ExportTest extends PreconditionSet
'schema' => 'public',
'table' => 'student',
'subject' => 'table',
- 'action' => 'export'])
+ 'action' => 'export', ])
);
// Enter information for export the data.
$this->assertTrue($this->setField('what', 'dataonly'));
@@ -205,7 +205,7 @@ class ExportTest extends PreconditionSet
'schema' => 'public',
'table' => 'student',
'subject' => 'table',
- 'action' => 'export'])
+ 'action' => 'export', ])
);
// Enter information for exporting the data.
@@ -224,7 +224,7 @@ class ExportTest extends PreconditionSet
'action' => 'confirm_empty',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
$this->assertTrue($this->clickSubmit($lang['strempty']));
@@ -247,7 +247,7 @@ class ExportTest extends PreconditionSet
'schema' => 'public',
'table' => 'student',
'subject' => 'table',
- 'action' => 'export'])
+ 'action' => 'export', ])
);
// Enter information for exporting the data.
@@ -278,7 +278,7 @@ class ExportTest extends PreconditionSet
'schema' => 'pg_catalog',
'view' => 'pg_user',
'subject' => 'view',
- 'action' => 'export'])
+ 'action' => 'export', ])
);
// Enter information for exporting the data.
diff --git a/tests/simpletest/testcase/Common/ImportTest.php b/tests/simpletest/testcase/Common/ImportTest.php
index c5668e30..d022ee33 100644
--- a/tests/simpletest/testcase/Common/ImportTest.php
+++ b/tests/simpletest/testcase/Common/ImportTest.php
@@ -54,7 +54,7 @@ class ImportTest extends PreconditionSet
global $webUrl;
global $lang, $SERVER, $DATABASE;
- $this->_dataFilePath = getcwd() . '/./data/';
+ $this->_dataFilePath = getcwd().'/./data/';
// Turn to the import data page.
$this->assertTrue(
@@ -64,12 +64,12 @@ class ImportTest extends PreconditionSet
'schema' => 'public',
'table' => $this->_tableName,
'subject' => 'table',
- 'action' => 'import'])
+ 'action' => 'import', ])
);
// Enter information for importing the data.
$this->assertTrue($this->setField('format', 'XML'));
- $this->assertTrue($this->setField('source', $this->_dataFilePath . $this->_tableName . '.xml'));
+ $this->assertTrue($this->setField('source', $this->_dataFilePath.$this->_tableName.'.xml'));
// Then submit and verify it.
$this->assertTrue($this->clickSubmit($lang['strimport']));
@@ -90,7 +90,7 @@ class ImportTest extends PreconditionSet
global $webUrl;
global $lang, $SERVER, $DATABASE;
- $this->_dataFilePath = getcwd() . '/./data/';
+ $this->_dataFilePath = getcwd().'/./data/';
// Turn to the import data page.
$this->assertTrue(
$this->get("${webUrl}/tblproperties", [
@@ -99,12 +99,12 @@ class ImportTest extends PreconditionSet
'schema' => 'public',
'table' => $this->_tableName,
'subject' => 'table',
- 'action' => 'import'])
+ 'action' => 'import', ])
);
// Enter information for importing the data.
$this->assertTrue($this->setField('format', $lang['strauto']));
- $this->assertTrue($this->setField('source', $this->_dataFilePath . $this->_tableName . '.txt'));
+ $this->assertTrue($this->setField('source', $this->_dataFilePath.$this->_tableName.'.txt'));
// Then submit and verify it.
$this->assertTrue($this->clickSubmit($lang['strimport']));
@@ -128,7 +128,7 @@ class ImportTest extends PreconditionSet
'action' => 'confirm_empty',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => $this->_tableName])
+ 'table' => $this->_tableName, ])
);
$this->assertTrue($this->clickSubmit($lang['strempty']));
diff --git a/tests/simpletest/testcase/Databases/AdminTest.php b/tests/simpletest/testcase/Databases/AdminTest.php
index 427471f7..bcf19fe7 100644
--- a/tests/simpletest/testcase/Databases/AdminTest.php
+++ b/tests/simpletest/testcase/Databases/AdminTest.php
@@ -56,10 +56,10 @@ class AdminTest extends PreconditionSet
$this->assertTrue(
$this->get(
"${webUrl}/database",
- ['database' => $DATABASE,
+ ['database' => $DATABASE,
'subject' => 'database',
'action' => 'admin',
- 'server' => $SERVER]
+ 'server' => $SERVER, ]
)
);
$this->assertTrue($this->setField('vacuum_analyze', true));
@@ -82,10 +82,10 @@ class AdminTest extends PreconditionSet
$this->assertTrue(
$this->get(
"${webUrl}/database",
- ['database' => $DATABASE,
+ ['database' => $DATABASE,
'subject' => 'database',
'action' => 'admin',
- 'server' => $SERVER]
+ 'server' => $SERVER, ]
)
);
$this->assertTrue($this->setField('vacuum_freeze', true));
@@ -107,10 +107,10 @@ class AdminTest extends PreconditionSet
$this->assertTrue(
$this->get(
"${webUrl}/database",
- ['database' => $DATABASE,
+ ['database' => $DATABASE,
'subject' => 'database',
'action' => 'admin',
- 'server' => $SERVER]
+ 'server' => $SERVER, ]
)
);
$this->assertTrue($this->clickSubmit($lang['stranalyze']));
@@ -133,7 +133,7 @@ class AdminTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'admin'])
+ 'action' => 'admin', ])
);
$this->assertTrue($this->clickSubmit($lang['strcluster']));
$this->assertText($lang['strclusteredgood']);
@@ -155,7 +155,7 @@ class AdminTest extends PreconditionSet
'database' => $DATABASE,
'subject' => 'database',
'action' => 'admin',
- 'server' => $SERVER])
+ 'server' => $SERVER, ])
);
$this->assertTrue($this->setField('reindex_force', true));
$this->assertTrue($this->clickSubmit($lang['strreindex']));
diff --git a/tests/simpletest/testcase/Databases/CastsTest.php b/tests/simpletest/testcase/Databases/CastsTest.php
index 66ab0a7f..1ede2e62 100644
--- a/tests/simpletest/testcase/Databases/CastsTest.php
+++ b/tests/simpletest/testcase/Databases/CastsTest.php
@@ -60,7 +60,7 @@ class CastsTest extends PreconditionSet
$this->get("${webUrl}/casts", [
'server' => $SERVER,
'database' => $DATABASE,
- 'subject' => 'database'])
+ 'subject' => 'database', ])
);
$this->assertText($lang['strsourcetype']);
diff --git a/tests/simpletest/testcase/Databases/DatabaseTest.php b/tests/simpletest/testcase/Databases/DatabaseTest.php
index ddbd6275..642c9a19 100644
--- a/tests/simpletest/testcase/Databases/DatabaseTest.php
+++ b/tests/simpletest/testcase/Databases/DatabaseTest.php
@@ -67,7 +67,7 @@ class DatabaseTest extends PreconditionSet
$this->assertTrue(
$this->get("${webUrl}/alldb", [
'server' => $SERVER,
- 'action' => 'create'])
+ 'action' => 'create', ])
);
// Fill the form about creating database.
@@ -115,7 +115,7 @@ class DatabaseTest extends PreconditionSet
$this->assertTrue(
$this->get("${webUrl}/alldb", [
'server' => $SERVER,
- 'action' => 'create'])
+ 'action' => 'create', ])
);
// Fill the form about creating database.
@@ -159,7 +159,7 @@ class DatabaseTest extends PreconditionSet
'action' => 'confirm_drop',
'subject' => 'database',
'database' => $DATABASE,
- 'dropdatabase' => $DATABASE])
+ 'dropdatabase' => $DATABASE, ])
);
// Click the submit button "Drop" next page.
diff --git a/tests/simpletest/testcase/Databases/FindObjectsTest.php b/tests/simpletest/testcase/Databases/FindObjectsTest.php
index 7973128e..4f5e261f 100644
--- a/tests/simpletest/testcase/Databases/FindObjectsTest.php
+++ b/tests/simpletest/testcase/Databases/FindObjectsTest.php
@@ -59,7 +59,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -84,7 +84,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -97,7 +97,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -110,7 +110,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -123,7 +123,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -136,7 +136,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -149,7 +149,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -162,7 +162,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -175,7 +175,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -188,7 +188,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -201,7 +201,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -214,7 +214,7 @@ class FindObjectsTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('term', 'student'));
@@ -237,7 +237,7 @@ class FindObjectsTest extends PreconditionSet
$this->assertTrue(
$this->get("${webUrl}/sqledit", [
'server' => $SERVER,
- 'action' => 'find'])
+ 'action' => 'find', ])
);
$this->assertTrue($this->setField('database', $DATABASE));
diff --git a/tests/simpletest/testcase/Databases/HelpTest.php b/tests/simpletest/testcase/Databases/HelpTest.php
index b997f522..68a420a5 100644
--- a/tests/simpletest/testcase/Databases/HelpTest.php
+++ b/tests/simpletest/testcase/Databases/HelpTest.php
@@ -62,7 +62,7 @@ class HelpTest extends PreconditionSet
$this->get("${webUrl}/database", [
'server' => $SERVER,
'database' => $DATABASE,
- 'subject' => 'database'])
+ 'subject' => 'database', ])
);
// Click the link about help.
@@ -91,14 +91,14 @@ class HelpTest extends PreconditionSet
$this->get("${webUrl}/database", [
'server' => $SERVER,
'database' => $DATABASE,
- 'subject' => 'database'])
+ 'subject' => 'database', ])
);
$this->assertTrue($this->get("${webUrl}/help", ['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' .
+ 'interactive/sql-expressions.html'.
'#SQL-SYNTAX-TYPE-CASTS'));
return true;
diff --git a/tests/simpletest/testcase/Databases/LanguageTest.php b/tests/simpletest/testcase/Databases/LanguageTest.php
index d3e9fd8f..f7001cb5 100644
--- a/tests/simpletest/testcase/Databases/LanguageTest.php
+++ b/tests/simpletest/testcase/Databases/LanguageTest.php
@@ -58,7 +58,7 @@ class LanguageTest extends PreconditionSet
$this->get("${webUrl}/languages", [
'server' => $SERVER,
'database' => $DATABASE,
- 'subject' => 'database'])
+ 'subject' => 'database', ])
);
$this->assertWantedPattern('/sql/');
diff --git a/tests/simpletest/testcase/Databases/ProcessesTest.php b/tests/simpletest/testcase/Databases/ProcessesTest.php
index 3b77dd2b..fdf0ded3 100644
--- a/tests/simpletest/testcase/Databases/ProcessesTest.php
+++ b/tests/simpletest/testcase/Databases/ProcessesTest.php
@@ -61,7 +61,7 @@ class ProcessesTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'processes'])
+ 'action' => 'processes', ])
);
$this->assertText($lang['strnodata']);
diff --git a/tests/simpletest/testcase/Databases/SchemaBasicTest.php b/tests/simpletest/testcase/Databases/SchemaBasicTest.php
index f05ff629..c3336f2a 100644
--- a/tests/simpletest/testcase/Databases/SchemaBasicTest.php
+++ b/tests/simpletest/testcase/Databases/SchemaBasicTest.php
@@ -59,13 +59,13 @@ class SchemaBasicTest extends PreconditionSet
$this->get("${webUrl}/database", [
'server' => $SERVER,
'database' => $DATABASE,
- 'subject' => 'database'])
+ 'subject' => 'database', ])
);
$this->assertTrue(
$this->get("${webUrl}/schemas", [
'server' => $SERVER,
'database' => $DATABASE,
- 'action' => 'create'])
+ 'action' => 'create', ])
);
$this->assertTrue($this->setField('formName', 'testSchemaName'));
@@ -95,26 +95,26 @@ class SchemaBasicTest extends PreconditionSet
$this->get("${webUrl}/database", [
'server' => $SERVER,
'database' => $DATABASE,
- 'subject' => 'database'])
+ 'subject' => 'database', ])
);
$this->assertTrue(
$this->get("${webUrl}/redirect", [
'server' => $SERVER,
'section' => 'database',
- 'database' => $DATABASE])
+ 'database' => $DATABASE, ])
);
$this->assertTrue(
$this->get("${webUrl}/database", [
'server' => $SERVER,
'database' => $DATABASE,
- 'subject' => 'database'])
+ 'subject' => 'database', ])
);
$this->assertTrue(
$this->get("${webUrl}/schemas", [
'server' => $SERVER,
'action' => 'alter',
'database' => $DATABASE,
- 'schema' => 'testSchemaName'])
+ 'schema' => 'testSchemaName', ])
);
$this->assertTrue($this->setField(
@@ -141,20 +141,20 @@ class SchemaBasicTest extends PreconditionSet
$this->get("${webUrl}/database", [
'server' => $SERVER,
'database' => $DATABASE,
- 'subject' => 'database'])
+ 'subject' => 'database', ])
);
$this->assertTrue(
$this->get("${webUrl}/redirect", [
'server' => $SERVER,
'section' => 'database',
- 'database' => $DATABASE])
+ 'database' => $DATABASE, ])
);
$this->assertTrue(
$this->get("${webUrl}/schemas", [
'server' => $SERVER,
'action' => 'drop',
'database' => $DATABASE,
- 'schema' => 'testSchemaName'])
+ 'schema' => 'testSchemaName', ])
);
$this->assertTrue($this->setField('cascade', true));
diff --git a/tests/simpletest/testcase/Databases/SqlTest.php b/tests/simpletest/testcase/Databases/SqlTest.php
index efeb13ab..65e45c69 100644
--- a/tests/simpletest/testcase/Databases/SqlTest.php
+++ b/tests/simpletest/testcase/Databases/SqlTest.php
@@ -58,10 +58,10 @@ class SqlTest extends PreconditionSet
$this->assertTrue(
$this->get(
"${webUrl}/database",
- ['database' => $DATABASE,
+ ['database' => $DATABASE,
'subject' => 'database',
'action' => 'sql',
- 'server' => $SERVER]
+ 'server' => $SERVER, ]
)
);
$this->assertTrue($this->setFieldById(0, 'select id from student;'));
@@ -86,7 +86,7 @@ class SqlTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'sql'])
+ 'action' => 'sql', ])
);
$this->assertTrue($this->setField('query', 'delete from "student";'));
@@ -109,12 +109,12 @@ class SqlTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'sql'])
+ 'action' => 'sql', ])
);
$this->assertTrue($this->setField(
'query',
- 'insert into studen t values ' .
- "(nextval('public.student_id_seq'::text)" .
+ 'insert into studen t values '.
+ "(nextval('public.student_id_seq'::text)".
", 'test2', now(), 'test2 is a student.');"
));
@@ -138,11 +138,11 @@ class SqlTest extends PreconditionSet
'database' => $DATABASE,
'server' => $SERVER,
'subject' => 'database',
- 'action' => 'sql'])
+ 'action' => 'sql', ])
);
$this->assertTrue($this->setField(
'query',
- 'update public."student" ' .
+ 'update public."student" '.
'set "birthday" = now();'
));
@@ -166,7 +166,7 @@ class SqlTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'sql'])
+ 'action' => 'sql', ])
);
$this->assertTrue($this->setField(
@@ -200,7 +200,7 @@ class SqlTest extends PreconditionSet
'database' => $DATABASE,
'server' => $SERVER,
'subject' => 'database',
- 'action' => 'sql'])
+ 'action' => 'sql', ])
);
$this->assertTrue($this->setField(
'query',
@@ -236,11 +236,11 @@ class SqlTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'sql'])
+ 'action' => 'sql', ])
);
$webServerUrl = getcwd();
- $sqlScriptUrl = getcwd() . '/data/select.sql';
+ $sqlScriptUrl = getcwd().'/data/select.sql';
$this->assertTrue($this->setField('script', $sqlScriptUrl));
@@ -317,7 +317,7 @@ class SqlTest extends PreconditionSet
'action' => 'create',
'server' => $SERVER,
'db_name' => $DATABASE,
- 'report_sql' => 'select id from student;']
+ 'report_sql' => 'select id from student;', ]
));
$this->assertTrue($this->setField('report_name', 'ppasimpletestreport'));
@@ -342,7 +342,7 @@ class SqlTest extends PreconditionSet
$this->get("${webUrl}/dataexport", [
'server' => $SERVER,
'query' => 'select+id+from+student%3B',
- 'database' => $DATABASE])
+ 'database' => $DATABASE, ])
);
$this->assertTrue($this->setField('d_format', 'XML'));
diff --git a/tests/simpletest/testcase/Databases/VariablesTest.php b/tests/simpletest/testcase/Databases/VariablesTest.php
index feb2c960..430ced95 100644
--- a/tests/simpletest/testcase/Databases/VariablesTest.php
+++ b/tests/simpletest/testcase/Databases/VariablesTest.php
@@ -59,7 +59,7 @@ class VariablesTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'variables'])
+ 'action' => 'variables', ])
);
$this->assertText($lang['strname']);
diff --git a/tests/simpletest/testcase/Public/SetPrecondition.php b/tests/simpletest/testcase/Public/SetPrecondition.php
index 0d144310..1bd2ada3 100644
--- a/tests/simpletest/testcase/Public/SetPrecondition.php
+++ b/tests/simpletest/testcase/Public/SetPrecondition.php
@@ -104,7 +104,7 @@ class PreconditionSet extends WebTestCase
'action' => 'confirm_drop',
'subject' => 'database',
'database' => $databaseName,
- 'dropdatabase' => $databaseName]
+ 'dropdatabase' => $databaseName, ]
);
$this->clickSubmit($lang['strdrop']);
@@ -146,7 +146,7 @@ class PreconditionSet extends WebTestCase
'server' => $SERVER,
'action' => 'create',
'database' => $databaseName,
- 'schema' => $schema]
+ 'schema' => $schema, ]
);
$this->setField('name', $tableName);
@@ -160,10 +160,10 @@ class PreconditionSet extends WebTestCase
$this->assertTrue($this->ClickSubmit('Next >'));
for ($ii = 0; $ii < $fieldNumber; ++$ii) {
- $field = 'field[' . $ii . ']';
- $type = 'type[' . $ii . ']';
- $array = 'array[' . $ii . ']';
- $fieldName = 'field' . $ii;
+ $field = 'field['.$ii.']';
+ $type = 'type['.$ii.']';
+ $array = 'array['.$ii.']';
+ $fieldName = 'field'.$ii;
// Enter the detail information of the table.
$this->setField($field, $fieldName);
@@ -209,7 +209,7 @@ class PreconditionSet extends WebTestCase
'action' => 'confirm_drop',
'database' => $databaseName,
'schema' => $schema,
- 'table' => $tableName]
+ 'table' => $tableName, ]
);
// Click the button "Drop" for dropping the table from the database.
diff --git a/tests/simpletest/testcase/Schemas/AggregateTest.php b/tests/simpletest/testcase/Schemas/AggregateTest.php
index a4aa96a0..2319e13c 100644
--- a/tests/simpletest/testcase/Schemas/AggregateTest.php
+++ b/tests/simpletest/testcase/Schemas/AggregateTest.php
@@ -62,11 +62,11 @@ class AggregateTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'sql'])
+ 'action' => 'sql', ])
);
// Enter the definition of the new aggregate.
- $this->assertTrue($this->setField('query', 'CREATE AGGREGATE ' .
- 'complex_sum(sfunc1 = box_intersect, basetype = box,' .
+ $this->assertTrue($this->setField('query', 'CREATE AGGREGATE '.
+ 'complex_sum(sfunc1 = box_intersect, basetype = box,'.
' stype1 = box, initcond1 = \'(0,0)\');'));
// Click the button "Go" to create a new aggregate.
@@ -93,7 +93,7 @@ class AggregateTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema']
+ 'subject' => 'schema', ]
));
// Verify whether the aggregates is displayed correctly.
@@ -115,10 +115,10 @@ class AggregateTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'sql'])
+ 'action' => 'sql', ])
);
- $this->assertTrue($this->setField('query', 'DROP AGGREGATE' .
+ $this->assertTrue($this->setField('query', 'DROP AGGREGATE'.
' complex_sum(box);'));
// Click the button "Go" to drop the aggregate.
diff --git a/tests/simpletest/testcase/Schemas/ConversionTest.php b/tests/simpletest/testcase/Schemas/ConversionTest.php
index 80a478d2..535b52de 100644
--- a/tests/simpletest/testcase/Schemas/ConversionTest.php
+++ b/tests/simpletest/testcase/Schemas/ConversionTest.php
@@ -62,7 +62,7 @@ class ConversionTest extends PreconditionSet
'server' => $SERVER,
'section' => 'schema',
'database' => 'template1',
- 'schema' => 'pg_catalog'])
+ 'schema' => 'pg_catalog', ])
);
// Click the "Conversions" hyper link.
$this->assertTrue($this->clickLink($lang['strconversions']));
diff --git a/tests/simpletest/testcase/Schemas/DomainTest.php b/tests/simpletest/testcase/Schemas/DomainTest.php
index 0eab6c0b..b55e53d7 100644
--- a/tests/simpletest/testcase/Schemas/DomainTest.php
+++ b/tests/simpletest/testcase/Schemas/DomainTest.php
@@ -62,7 +62,7 @@ class DomainTest extends PreconditionSet
'server' => $SERVER,
'action' => 'create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter the detail information of the new domain.
@@ -96,7 +96,7 @@ class DomainTest extends PreconditionSet
'action' => 'properties',
'database' => $DATABASE,
'schema' => 'public',
- 'domain' => 'spikedomain'])
+ 'domain' => 'spikedomain', ])
);
$this->assertTrue($this->clickLink($lang['stralter']));
@@ -126,7 +126,7 @@ class DomainTest extends PreconditionSet
'action' => 'properties',
'database' => $DATABASE,
'schema' => 'public',
- 'domain' => 'spikedomain'])
+ 'domain' => 'spikedomain', ])
);
$this->assertTrue($this->clickLink($lang['straddcheck']));
@@ -161,7 +161,7 @@ class DomainTest extends PreconditionSet
$this->get("${webUrl}/domains", [
'server' => $SERVER,
'database' => $DATABASE,
- 'schema' => 'public&'])
+ 'schema' => 'public&', ])
);
// Display the specfied damain.
@@ -176,7 +176,7 @@ class DomainTest extends PreconditionSet
'schema' => 'public',
'constraint' => 'newcheck',
'domain' => 'spikedomain',
- 'type' => 'c'])
+ 'type' => 'c', ])
);
$this->assertTrue($this->setField('cascade', true));
@@ -204,7 +204,7 @@ class DomainTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
$this->assertTrue(
@@ -213,7 +213,7 @@ class DomainTest extends PreconditionSet
'action' => 'confirm_drop',
'database' => $DATABASE,
'schema' => 'public',
- 'domain' => 'spikedomain'])
+ 'domain' => 'spikedomain', ])
);
$this->assertTrue($this->setField('cascade', true));
diff --git a/tests/simpletest/testcase/Schemas/FunctionTest.php b/tests/simpletest/testcase/Schemas/FunctionTest.php
index a5ba1c22..6ffb55b4 100644
--- a/tests/simpletest/testcase/Schemas/FunctionTest.php
+++ b/tests/simpletest/testcase/Schemas/FunctionTest.php
@@ -62,7 +62,7 @@ class FunctionTest extends PreconditionSet
'server' => $SERVER,
'action' => 'create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter the detail information of a SQL/PL function.
@@ -102,7 +102,7 @@ class FunctionTest extends PreconditionSet
'action' => 'create',
'language' => 'internal',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter the detail information of a SQL/PL function.
@@ -138,7 +138,7 @@ class FunctionTest extends PreconditionSet
$this->get("${webUrl}/functions", [
'server' => $SERVER,
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Turn to the C-function create page.
$this->assertTrue($this->clickLink($lang['strcreatecfunction']));
@@ -147,7 +147,7 @@ class FunctionTest extends PreconditionSet
$this->assertTrue($this->setField('formFunction', 'cfunction'));
$this->assertTrue($this->setField('formArguments', 'text'));
$this->assertTrue($this->setField('formReturns', 'boolean'));
- $cFunLocation = getcwd() . '/../data/CFunction/euc_jp_and_sjis';
+ $cFunLocation = getcwd().'/../data/CFunction/euc_jp_and_sjis';
$this->assertTrue($this->setField('formObjectFile', $cFunLocation));
$this->assertTrue($this->setField('formLinkSymbol', 'mic_to_sjis'));
$this->assertTrue($this->setField('formProperties[0]', 'VOLATILE'));
@@ -177,7 +177,7 @@ class FunctionTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Alter the definiton of "cfunction".
@@ -212,7 +212,7 @@ class FunctionTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Drop the fucntion "sqlplfunction".
diff --git a/tests/simpletest/testcase/Schemas/OpClassTest.php b/tests/simpletest/testcase/Schemas/OpClassTest.php
index f309e50b..2c337587 100644
--- a/tests/simpletest/testcase/Schemas/OpClassTest.php
+++ b/tests/simpletest/testcase/Schemas/OpClassTest.php
@@ -62,7 +62,7 @@ class OpClassTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'pg_catalog',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Verify whether all the op classes are displayed.
diff --git a/tests/simpletest/testcase/Schemas/OperatorTest.php b/tests/simpletest/testcase/Schemas/OperatorTest.php
index dfb2ac8b..f1c64d50 100644
--- a/tests/simpletest/testcase/Schemas/OperatorTest.php
+++ b/tests/simpletest/testcase/Schemas/OperatorTest.php
@@ -62,12 +62,12 @@ class OperatorTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'subject' => 'database',
- 'action' => 'sql'])
+ 'action' => 'sql', ])
);
// Enter the definition of the new operator.
- $this->assertTrue($this->setField('query', 'CREATE OPERATOR === (' .
- 'LEFTARG = box, RIGHTARG = box, PROCEDURE = box_above, ' .
- 'COMMUTATOR = ==, NEGATOR = !==, RESTRICT = areasel, JOIN ' .
+ $this->assertTrue($this->setField('query', 'CREATE OPERATOR === ('.
+ 'LEFTARG = box, RIGHTARG = box, PROCEDURE = box_above, '.
+ 'COMMUTATOR = ==, NEGATOR = !==, RESTRICT = areasel, JOIN '.
'= areajoinsel);'));
// Click the button "Go" to create a new operator.
@@ -93,7 +93,7 @@ class OperatorTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Show the properties of the operator "===".
$this->assertTrue($this->clickLink('==='));
@@ -118,7 +118,7 @@ class OperatorTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Drop the first operator.
diff --git a/tests/simpletest/testcase/Schemas/SequenceTest.php b/tests/simpletest/testcase/Schemas/SequenceTest.php
index 44384599..d5142058 100644
--- a/tests/simpletest/testcase/Schemas/SequenceTest.php
+++ b/tests/simpletest/testcase/Schemas/SequenceTest.php
@@ -62,7 +62,7 @@ class SequenceTest extends PreconditionSet
'server' => $SERVER,
'action' => 'create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter the detail information of a sequence.
@@ -98,7 +98,7 @@ class SequenceTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Browse the specified sequence.
$this->assertTrue($this->clickLink('createsequence'));
@@ -128,7 +128,7 @@ class SequenceTest extends PreconditionSet
'action' => 'confirm_drop',
'database' => $DATABASE,
'schema' => 'public',
- 'sequence' => 'createsequence'])
+ 'sequence' => 'createsequence', ])
);
$this->assertTrue($this->setField('cascade', true));
diff --git a/tests/simpletest/testcase/Schemas/TableTest.php b/tests/simpletest/testcase/Schemas/TableTest.php
index b8d2bdb4..bc2be2c4 100644
--- a/tests/simpletest/testcase/Schemas/TableTest.php
+++ b/tests/simpletest/testcase/Schemas/TableTest.php
@@ -62,7 +62,7 @@ class TableTest extends PreconditionSet
'server' => $SERVER,
'action' => 'create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter the table name and field number.
@@ -112,7 +112,7 @@ class TableTest extends PreconditionSet
'server' => $SERVER,
'action' => 'create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter no name.
@@ -160,7 +160,7 @@ class TableTest extends PreconditionSet
'server' => $SERVER,
'action' => 'create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter the table name and field number.
@@ -213,7 +213,7 @@ class TableTest extends PreconditionSet
'action' => 'confinsertrow',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
// Set the value of the fields.
@@ -245,7 +245,7 @@ class TableTest extends PreconditionSet
'action' => 'confinsertrow',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
// Set the value of the fields.
@@ -289,7 +289,7 @@ class TableTest extends PreconditionSet
'action' => 'confinsertrow',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
// Set the value of the fields.
@@ -325,7 +325,7 @@ class TableTest extends PreconditionSet
$this->get("${webUrl}/tables", [
'server' => $SERVER,
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Select the table "viewtest".
$this->assertTrue($this->clickLink('viewtest'));
@@ -362,7 +362,7 @@ class TableTest extends PreconditionSet
$this->get("${webUrl}/tables", [
'server' => $SERVER,
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Select the table "viewtest".
$this->assertTrue($this->clickLink('viewtest'));
@@ -395,7 +395,7 @@ class TableTest extends PreconditionSet
'subject' => 'table',
'return_url' => 'tables.php%3Fdatabase%3Dtest%26amp%3Bschema%3Dpublic',
'return_desc' => 'Back',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
// Verify whether the rows are displayed.
@@ -427,7 +427,7 @@ class TableTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
$this->assertTrue($this->clickLink('viewtest'));
@@ -461,7 +461,7 @@ class TableTest extends PreconditionSet
'action' => 'confselectrows',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
// Display all columns.
@@ -497,7 +497,7 @@ class TableTest extends PreconditionSet
'action' => 'confselectrows',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
// Enter the query conditions.
@@ -529,7 +529,7 @@ class TableTest extends PreconditionSet
'action' => 'confirm_vacuum',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
// Click the "Vacuum" button.
@@ -556,7 +556,7 @@ class TableTest extends PreconditionSet
'action' => 'confirm_vacuum',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
// Make sure the check box "Full" and "Analyze" are checked
@@ -586,7 +586,7 @@ class TableTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Empty a table.
@@ -596,7 +596,7 @@ class TableTest extends PreconditionSet
'action' => 'confirm_empty',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
// Click the "Empty" button to clean the content of the table.
$this->assertTrue($this->clickSubmit($lang['strempty']));
@@ -622,7 +622,7 @@ class TableTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Select the table.
$this->assertTrue(
@@ -631,7 +631,7 @@ class TableTest extends PreconditionSet
'action' => 'confirm_alter',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'viewtest'])
+ 'table' => 'viewtest', ])
);
$this->assertTrue($this->setField('name', 'testview'));
@@ -660,7 +660,7 @@ class TableTest extends PreconditionSet
'action' => 'confirm_drop',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'testview'])
+ 'table' => 'testview', ])
);
$this->assertTrue($this->setField('cascade', true));
diff --git a/tests/simpletest/testcase/Schemas/TypeTest.php b/tests/simpletest/testcase/Schemas/TypeTest.php
index 0a793e44..9788eb4e 100644
--- a/tests/simpletest/testcase/Schemas/TypeTest.php
+++ b/tests/simpletest/testcase/Schemas/TypeTest.php
@@ -62,7 +62,7 @@ class TypeTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
$this->assertTrue($this->clickLink($lang['strcreatetype']));
@@ -93,7 +93,7 @@ class TypeTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
$this->assertTrue($this->clickLink($lang['strcreatecomptype']));
@@ -151,7 +151,7 @@ class TypeTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'pg_catalog',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Show the properties of general type.
@@ -165,7 +165,7 @@ class TypeTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Show the properties of a composite type "compositetype".
@@ -192,7 +192,7 @@ class TypeTest extends PreconditionSet
'action' => 'confirm_drop',
'database' => $DATABASE,
'schema' => 'public',
- 'type' => 'compositetype'])
+ 'type' => 'compositetype', ])
);
$this->assertTrue($this->setField('cascade', true));
diff --git a/tests/simpletest/testcase/Schemas/ViewTest.php b/tests/simpletest/testcase/Schemas/ViewTest.php
index f2e851a0..e87d174c 100644
--- a/tests/simpletest/testcase/Schemas/ViewTest.php
+++ b/tests/simpletest/testcase/Schemas/ViewTest.php
@@ -64,7 +64,7 @@ class ViewTest extends PreconditionSet
'server' => $SERVER,
'action' => 'create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter the definition of the view.
@@ -99,7 +99,7 @@ class ViewTest extends PreconditionSet
'server' => $SERVER,
'action' => 'wiz_create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Select the table.
@@ -137,7 +137,7 @@ class ViewTest extends PreconditionSet
'server' => $SERVER,
'action' => 'create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter the definition of the view.
@@ -176,7 +176,7 @@ class ViewTest extends PreconditionSet
'server' => $SERVER,
'action' => 'wiz_create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Select the table.
@@ -216,7 +216,7 @@ class ViewTest extends PreconditionSet
'subject' => 'view',
'return_url' => 'views.php%3Fdatabase%3Dtest%26amp%3Bschema%3Dpublic',
'return_desc' => 'Back',
- 'view' => 'createviewdirectly'])
+ 'view' => 'createviewdirectly', ])
);
// Click the links in the view-display page.
@@ -243,7 +243,7 @@ class ViewTest extends PreconditionSet
'action' => 'confselectrows',
'database' => $DATABASE,
'schema' => 'public',
- 'view' => 'createviewdirectly'])
+ 'view' => 'createviewdirectly', ])
);
// Enter the query conditions.
@@ -273,7 +273,7 @@ class ViewTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Select a view.
$this->assertTrue($this->clickLink('createviewdirectly'));
@@ -306,7 +306,7 @@ class ViewTest extends PreconditionSet
'server' => $SERVER,
'database' => $DATABASE,
'schema' => 'public',
- 'subject' => 'schema'])
+ 'subject' => 'schema', ])
);
// Select a view.
$this->assertTrue($this->clickLink('createviewdirectly'));
@@ -317,7 +317,7 @@ class ViewTest extends PreconditionSet
// Alter the definition here.
$this->assertTrue($this->setField(
'formDefinition',
- 'SELECT viewtest.field0 AS newfield, ' .
+ 'SELECT viewtest.field0 AS newfield, '.
'viewtest.field2 AS field1 FROM viewtest;'
));
$this->assertTrue($this->setField('formComment', 'The definition be altered.'));
@@ -346,7 +346,7 @@ class ViewTest extends PreconditionSet
'action' => 'confirm_drop',
'database' => $DATABASE,
'schema' => 'public',
- 'view' => 'createviewdirectly'])
+ 'view' => 'createviewdirectly', ])
);
$this->assertTrue($this->setField('cascade', true));
diff --git a/tests/simpletest/testcase/Server/GroupsTest.php b/tests/simpletest/testcase/Server/GroupsTest.php
index 3e4d4004..250d3f6b 100644
--- a/tests/simpletest/testcase/Server/GroupsTest.php
+++ b/tests/simpletest/testcase/Server/GroupsTest.php
@@ -82,9 +82,9 @@ class GroupsTest extends PreconditionSet
$this->assertTrue(
$this->get(
"${webUrl}/groups",
- ['action' => 'properties',
+ ['action' => 'properties',
'group' => $this->_groupName,
- 'server' => $SERVER]
+ 'server' => $SERVER, ]
)
);
@@ -119,9 +119,9 @@ class GroupsTest extends PreconditionSet
$this->assertTrue(
$this->get(
"${webUrl}/groups",
- ['action' => 'properties',
+ ['action' => 'properties',
'group' => $this->_groupName,
- 'server' => $SERVER]
+ 'server' => $SERVER, ]
)
);
@@ -147,9 +147,9 @@ class GroupsTest extends PreconditionSet
$this->assertTrue(
$this->get(
"${webUrl}/groups",
- ['server' => $SERVER,
+ ['server' => $SERVER,
'action' => 'confirm_drop',
- 'group' => $this->_groupName]
+ 'group' => $this->_groupName, ]
)
);
diff --git a/tests/simpletest/testcase/Server/TableSpacesTest.php b/tests/simpletest/testcase/Server/TableSpacesTest.php
index 1fc4bdb4..7d92d813 100644
--- a/tests/simpletest/testcase/Server/TableSpacesTest.php
+++ b/tests/simpletest/testcase/Server/TableSpacesTest.php
@@ -50,7 +50,7 @@ class TableSpacesTest extends PreconditionSet
global $webUrl;
global $POWER_USER_NAME;
global $lang, $SERVER;
- $this->_location = getcwd() . '/data/TableSpace';
+ $this->_location = getcwd().'/data/TableSpace';
// Turn to the create tablespace page.
$this->assertTrue($this->get("${webUrl}/tablespaces", ['server' => $SERVER]));
@@ -84,7 +84,7 @@ class TableSpacesTest extends PreconditionSet
$this->get("${webUrl}/tablespaces", [
'server' => $SERVER,
'action' => 'edit',
- 'tablespace' => $this->_tableSpaceName])
+ 'tablespace' => $this->_tableSpaceName, ])
);
// Enter information for altering the tableSpace's properties.
@@ -114,7 +114,7 @@ class TableSpacesTest extends PreconditionSet
$this->get("${webUrl}/privileges", [
'server' => $SERVER,
'subject' => 'tablespace',
- 'tablespace' => $this->_tableSpaceName])
+ 'tablespace' => $this->_tableSpaceName, ])
);
// Grant with no privileges selected.
@@ -148,7 +148,7 @@ class TableSpacesTest extends PreconditionSet
$this->get("${webUrl}/privileges", [
'server' => $SERVER,
'subject' => 'tablespace',
- 'tablespace' => $this->_tableSpaceName])
+ 'tablespace' => $this->_tableSpaceName, ])
);
// Revoke with no users selected.
@@ -180,7 +180,7 @@ class TableSpacesTest extends PreconditionSet
$this->get("${webUrl}/privileges", [
'server' => $SERVER,
'subject' => 'tablespace',
- 'tablespace' => $this->_tableSpaceName])
+ 'tablespace' => $this->_tableSpaceName, ])
);
// Grant whit no privilege selected.
@@ -210,7 +210,7 @@ class TableSpacesTest extends PreconditionSet
$this->get("${webUrl}/privileges", [
'server' => $SERVER,
'subject' => 'tablespace',
- 'tablespace' => $this->_tableSpaceName])
+ 'tablespace' => $this->_tableSpaceName, ])
);
// Revoke whit no users selected.
@@ -238,7 +238,7 @@ class TableSpacesTest extends PreconditionSet
$this->get("${webUrl}/tablespaces", [
'server' => $SERVER,
'action' => 'confirm_drop',
- 'tablespace' => $this->_tableSpaceName])
+ 'tablespace' => $this->_tableSpaceName, ])
);
// Confirm to drop the user and verify it.
diff --git a/tests/simpletest/testcase/Server/UsersTest.php b/tests/simpletest/testcase/Server/UsersTest.php
index 403aac9d..0c066c6b 100644
--- a/tests/simpletest/testcase/Server/UsersTest.php
+++ b/tests/simpletest/testcase/Server/UsersTest.php
@@ -129,7 +129,7 @@ class UsersTest extends PreconditionSet
$this->get("${webUrl}/users", [
'action' => 'edit',
'username' => $this->_superUserName,
- 'server' => $SERVER])
+ 'server' => $SERVER, ])
);
// Enter the information for altering the user's properties.
@@ -161,7 +161,7 @@ class UsersTest extends PreconditionSet
$this->get("${webUrl}/users", [
'action' => 'confirm_drop',
'username' => $this->_superUserName,
- 'server' => $SERVER])
+ 'server' => $SERVER, ])
);
// Confirm to drop the user and verify it.
@@ -192,9 +192,9 @@ class UsersTest extends PreconditionSet
// Turn to the old browser which we login with super user at very beginning.
$this->assertTrue($this->get("${webUrl}/users", ['server' => $SERVER]));
$this->assertTrue(
- $this->get("${webUrl}/users", ['action' => 'confirm_drop',
+ $this->get("${webUrl}/users", ['action' => 'confirm_drop',
'username' => $this->_powerUserName,
- 'server' => $SERVER])
+ 'server' => $SERVER, ])
);
// Confirm to drop the user and verify it.
@@ -228,7 +228,7 @@ class UsersTest extends PreconditionSet
$this->get("${webUrl}/users", [
'action' => 'confirm_drop',
'username' => $SUPER_USER_NAME,
- 'server' => $SERVER])
+ 'server' => $SERVER, ])
);
// Confirm to drop the user and verify it.
diff --git a/tests/simpletest/testcase/Tables/ColumnTest.php b/tests/simpletest/testcase/Tables/ColumnTest.php
index 022f5d6a..a79af4c3 100644
--- a/tests/simpletest/testcase/Tables/ColumnTest.php
+++ b/tests/simpletest/testcase/Tables/ColumnTest.php
@@ -59,11 +59,11 @@ class ColumnTest extends PreconditionSet
$this->assertTrue(
$this->get(
"${webUrl}/tblproperties",
- ['action' => 'add_column',
+ ['action' => 'add_column',
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'server' => $SERVER]
+ 'server' => $SERVER, ]
)
);
@@ -94,7 +94,7 @@ class ColumnTest extends PreconditionSet
'action' => 'add_column',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new column
@@ -124,7 +124,7 @@ class ColumnTest extends PreconditionSet
'action' => 'add_column',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new column
@@ -152,7 +152,7 @@ class ColumnTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'column' => 'sid'])
+ 'column' => 'sid', ])
);
// Set properties for the new column
@@ -184,7 +184,7 @@ class ColumnTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'column' => 'sid'])
+ 'column' => 'sid', ])
);
// Set properties for the new column
@@ -216,7 +216,7 @@ class ColumnTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'column' => 'sid'])
+ 'column' => 'sid', ])
);
// Set properties for the new column
@@ -245,7 +245,7 @@ class ColumnTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'column' => 'sid'])
+ 'column' => 'sid', ])
);
$this->assertTrue($this->clickSubmit($lang['strcancel']));
@@ -269,7 +269,7 @@ class ColumnTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'column' => 'sid'])
+ 'column' => 'sid', ])
);
$this->assertTrue($this->clickSubmit($lang['strdrop']));
// Verify if the column is dropped correctly.
@@ -296,7 +296,7 @@ class ColumnTest extends PreconditionSet
'action' => 'add_column',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new column
@@ -323,7 +323,7 @@ class ColumnTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'column' => 'sid'])
+ 'column' => 'sid', ])
);
$this->assertTrue($this->setField('cascade', true));
$this->assertTrue($this->clickSubmit($lang['strdrop']));
diff --git a/tests/simpletest/testcase/Tables/ConstraintsTest.php b/tests/simpletest/testcase/Tables/ConstraintsTest.php
index ca710bc4..5504f572 100644
--- a/tests/simpletest/testcase/Tables/ConstraintsTest.php
+++ b/tests/simpletest/testcase/Tables/ConstraintsTest.php
@@ -62,7 +62,7 @@ class ConstraintsTest extends PreconditionSet
'action' => 'add_check',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new constraint
@@ -94,7 +94,7 @@ class ConstraintsTest extends PreconditionSet
'schema' => 'public',
'table' => 'student',
'constraint' => 'id_check',
- 'type' => 'c'])
+ 'type' => 'c', ])
);
$this->assertTrue($this->clickSubmit($lang['strdrop']));
// Verify if the constraint is dropped correctly.
@@ -119,7 +119,7 @@ class ConstraintsTest extends PreconditionSet
'action' => 'add_unique_key',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new constraint
@@ -148,7 +148,7 @@ class ConstraintsTest extends PreconditionSet
$this->get("${webUrl}/constraints", [
'server' => $SERVER, 'action' => 'confirm_drop',
'database' => $DATABASE, 'schema' => 'public',
- 'table' => 'student', 'constraint' => 'unique_name'])
+ 'table' => 'student', 'constraint' => 'unique_name', ])
);
$this->assertTrue($this->clickSubmit($lang['strdrop']));
@@ -172,7 +172,7 @@ class ConstraintsTest extends PreconditionSet
$this->get("${webUrl}/constraints", [
'server' => $SERVER, 'action' => 'add_primary_key',
'database' => $DATABASE, 'schema' => 'public',
- 'table' => 'college_student'])
+ 'table' => 'college_student', ])
);
// Set properties for the new constraint
@@ -203,7 +203,7 @@ class ConstraintsTest extends PreconditionSet
$this->get("${webUrl}/constraints", [
'server' => $SERVER, 'action' => 'confirm_drop', 'database' => $DATABASE,
'schema' => 'public', 'table' => 'college_student', 'constraint' => 'primary_id',
- 'type' => 'p'])
+ 'type' => 'p', ])
);
$this->assertTrue($this->clickSubmit($lang['strdrop']));
$this->assertTrue($this->assertText($lang['strconstraintdropped']));
@@ -224,7 +224,7 @@ class ConstraintsTest extends PreconditionSet
$this->assertTrue(
$this->get("${webUrl}/constraints", [
'server' => $SERVER, 'action' => 'add_foreign_key', 'database' => $DATABASE,
- 'schema' => 'public', 'table' => 'student'])
+ 'schema' => 'public', 'table' => 'student', ])
);
// Set properties for the new constraint
@@ -262,7 +262,7 @@ class ConstraintsTest extends PreconditionSet
$this->get("${webUrl}/constraints", [
'server' => $SERVER, 'action' => 'confirm_drop', 'database' => $DATABASE,
'schema' => 'public', 'table' => 'student', 'constraint' => 'foreign_id',
- 'type' => 'f'])
+ 'type' => 'f', ])
);
$this->assertTrue($this->clickSubmit($lang['strdrop']));
$this->assertTrue($this->assertText($lang['strconstraintdropped']));
diff --git a/tests/simpletest/testcase/Tables/DeadlockTest.php b/tests/simpletest/testcase/Tables/DeadlockTest.php
index 1342a6c2..7dc8c7d8 100644
--- a/tests/simpletest/testcase/Tables/DeadlockTest.php
+++ b/tests/simpletest/testcase/Tables/DeadlockTest.php
@@ -72,7 +72,7 @@ class DeadlockTest extends PreconditionSet
'action' => 'add_check',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new constraint
@@ -93,7 +93,7 @@ class DeadlockTest extends PreconditionSet
$newBrowser->get("${webUrl}/users", [
'server' => $SERVER,
'action' => 'edit',
- 'username' => $POWER_USER_NAME])
+ 'username' => $POWER_USER_NAME, ])
);
// Enter the information for altering the user's properties.
$this->assertTrue($newBrowser->setField('newname', $POWER_USER_NAME));
@@ -114,7 +114,7 @@ class DeadlockTest extends PreconditionSet
$newBrowser->get("${webUrl}/users", [
'server' => $SERVER,
'action' => 'edit',
- 'username' => $POWER_USER_NAME])
+ 'username' => $POWER_USER_NAME, ])
);
// Change back the user's password
@@ -163,7 +163,7 @@ class DeadlockTest extends PreconditionSet
$this->assertTrue(
$this->get("${webUrl}/alldb", [
'server' => $SERVER,
- 'action' => 'create'])
+ 'action' => 'create', ])
);
$this->assertTrue($this->setfield('formName', 'newdb'));
$this->assertTrue($this->setfield('formEncoding', 'UNICODE'));
@@ -182,7 +182,7 @@ class DeadlockTest extends PreconditionSet
$newBrowser->get("${webUrl}/users", [
'server' => $SERVER,
'action' => 'edit',
- 'username' => $POWER_USER_NAME])
+ 'username' => $POWER_USER_NAME, ])
);
$this->assertTrue($newBrowser->setField('newname', $POWER_USER_NAME));
$this->assertTrue($newBrowser->setField('formPassword', 'tester'));
@@ -202,7 +202,7 @@ class DeadlockTest extends PreconditionSet
$newBrowser->get("${webUrl}/users", [
'server' => $SERVER,
'action' => 'edit',
- 'username' => $POWER_USER_NAME])
+ 'username' => $POWER_USER_NAME, ])
);
$this->assertTrue($newBrowser->setField('newname', $POWER_USER_NAME));
@@ -249,7 +249,7 @@ class DeadlockTest extends PreconditionSet
'action' => 'add_column',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new column
$this->assertTrue($this->setField('field', 'sid'));
@@ -266,7 +266,7 @@ class DeadlockTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'column' => 'sid'])
+ 'column' => 'sid', ])
);
// Set properties for the new column
$this->assertTrue($this->setField('field', 'ssid'));
@@ -289,7 +289,7 @@ class DeadlockTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'column' => 'sid'])
+ 'column' => 'sid', ])
);
$this->assertTrue($newBrowser->clickSubmit($lang['strdrop']));
@@ -332,7 +332,7 @@ class DeadlockTest extends PreconditionSet
'server' => $SERVER,
'action' => 'create',
'database' => $DATABASE,
- 'schema' => 'public'])
+ 'schema' => 'public', ])
);
// Enter the table name and field number.
@@ -369,7 +369,7 @@ class DeadlockTest extends PreconditionSet
'action' => 'confselectrows',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'newtable'])
+ 'table' => 'newtable', ])
);
// Select all the rows.
@@ -392,7 +392,7 @@ class DeadlockTest extends PreconditionSet
'action' => 'confirm_drop',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'newtable']
+ 'table' => 'newtable', ]
);
$this->assertTrue($newBrowser->clickSubmit($lang['strdrop']));
diff --git a/tests/simpletest/testcase/Tables/IndexesTest.php b/tests/simpletest/testcase/Tables/IndexesTest.php
index a978775a..2be606d1 100644
--- a/tests/simpletest/testcase/Tables/IndexesTest.php
+++ b/tests/simpletest/testcase/Tables/IndexesTest.php
@@ -62,7 +62,7 @@ class IndexesTest extends PreconditionSet
'action' => 'create_index',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new index
@@ -97,7 +97,7 @@ class IndexesTest extends PreconditionSet
'action' => 'create_index',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new index
@@ -130,7 +130,7 @@ class IndexesTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'index' => 'stu_name_idx'])
+ 'index' => 'stu_name_idx', ])
);
// Verify if the index is reindexed correctly.
@@ -155,7 +155,7 @@ class IndexesTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'index' => 'student_pkey'])
+ 'index' => 'student_pkey', ])
);
$this->assertTrue($this->setField('analyze', true));
$this->assertTrue($this->clickSubmit($lang['strcluster']));
@@ -182,7 +182,7 @@ class IndexesTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'index' => 'student_pkey'])
+ 'index' => 'student_pkey', ])
);
$this->assertTrue($this->setField('analyze', false));
$this->assertTrue($this->clickSubmit($lang['strcluster']));
@@ -208,7 +208,7 @@ class IndexesTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'constraint' => 'student_pkey'])
+ 'constraint' => 'student_pkey', ])
);
$this->assertTrue($this->setField('analyze', true));
$this->assertTrue($this->clickSubmit($lang['strcancel']));
@@ -232,7 +232,7 @@ class IndexesTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'index' => 'stu_name_idx'])
+ 'index' => 'stu_name_idx', ])
);
$this->assertField($this->setField('cascade', false));
$this->assertTrue($this->clickSubmit($lang['strcancel']));
@@ -256,7 +256,7 @@ class IndexesTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'index' => 'stu_name_idx'])
+ 'index' => 'stu_name_idx', ])
);
$this->assertField($this->setField('cascade', true));
$this->assertTrue($this->clickSubmit($lang['strdrop']));
diff --git a/tests/simpletest/testcase/Tables/InfoTest.php b/tests/simpletest/testcase/Tables/InfoTest.php
index f9599d3f..200584cf 100644
--- a/tests/simpletest/testcase/Tables/InfoTest.php
+++ b/tests/simpletest/testcase/Tables/InfoTest.php
@@ -62,7 +62,7 @@ class InfoTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'subject' => 'table'])
+ 'subject' => 'table', ])
);
return true;
@@ -84,7 +84,7 @@ class InfoTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'college_student',
- 'subject' => 'table'])
+ 'subject' => 'table', ])
);
return true;
@@ -106,7 +106,7 @@ class InfoTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'department',
- 'subject' => 'table'])
+ 'subject' => 'table', ])
);
return true;
@@ -128,11 +128,11 @@ class InfoTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'department',
- 'subject' => 'table'])
+ 'subject' => 'table', ])
);
$this->assertTrue($this->clickLink($lang['strproperties']));
- $this->assertText('FOREIGN KEY (dep_id) REFERENCES department(id) ' .
+ $this->assertText('FOREIGN KEY (dep_id) REFERENCES department(id) '.
'ON UPDATE RESTRICT ON DELETE RESTRICT');
return true;
diff --git a/tests/simpletest/testcase/Tables/RulesTest.php b/tests/simpletest/testcase/Tables/RulesTest.php
index 82db1761..b1bf253b 100644
--- a/tests/simpletest/testcase/Tables/RulesTest.php
+++ b/tests/simpletest/testcase/Tables/RulesTest.php
@@ -62,7 +62,7 @@ class RulesTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'subject' => 'table'])
+ 'subject' => 'table', ])
);
// Set properties for the new rule
@@ -95,7 +95,7 @@ class RulesTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'subject' => 'table'])
+ 'subject' => 'table', ])
);
// Set properties for the new rule
@@ -127,7 +127,7 @@ class RulesTest extends PreconditionSet
'reltype' => 'table',
'table' => 'student',
'subject' => 'rule',
- 'rule' => 'insert_stu_rule'])
+ 'rule' => 'insert_stu_rule', ])
);
$this->assertTrue($this->clickSubmit($lang['strno']));
@@ -153,7 +153,7 @@ class RulesTest extends PreconditionSet
'reltype' => 'table',
'table' => 'student',
'subject' => 'rule',
- 'rule' => 'insert_stu_rule'])
+ 'rule' => 'insert_stu_rule', ])
);
$this->assertTrue($this->clickSubmit($lang['stryes']));
// Verify if the rule is dropped correctly.
@@ -181,7 +181,7 @@ class RulesTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'subject' => 'table'])
+ 'subject' => 'table', ])
);
// Set properties for the new rule
@@ -211,7 +211,7 @@ class RulesTest extends PreconditionSet
'reltype' => 'table',
'table' => 'student',
'subject' => 'rule',
- 'rule' => 'insert_stu_rule'])
+ 'rule' => 'insert_stu_rule', ])
);
$this->assertTrue($this->setField('cascade', true));
$this->assertTrue($this->clickSubmit($lang['stryes']));
diff --git a/tests/simpletest/testcase/Tables/TriggersTest.php b/tests/simpletest/testcase/Tables/TriggersTest.php
index 393cc770..5f8b2558 100644
--- a/tests/simpletest/testcase/Tables/TriggersTest.php
+++ b/tests/simpletest/testcase/Tables/TriggersTest.php
@@ -62,7 +62,7 @@ class TriggersTest extends PreconditionSet
'action' => 'create',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new trigger
@@ -101,7 +101,7 @@ class TriggersTest extends PreconditionSet
'action' => 'create',
'database' => $DATABASE,
'schema' => 'public',
- 'table' => 'student'])
+ 'table' => 'student', ])
);
// Set properties for the new trigger
@@ -138,7 +138,7 @@ class TriggersTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'trigger' => 'insert_stu_trigger'])
+ 'trigger' => 'insert_stu_trigger', ])
);
$this->assertTrue($this->setField('name', 'changed_trigger'));
$this->assertTrue($this->clickSubmit($lang['strok']));
@@ -165,7 +165,7 @@ class TriggersTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'trigger' => 'changed_trigger'])
+ 'trigger' => 'changed_trigger', ])
);
$this->assertTrue($this->setField('name', 'changed_trigger_changed'));
$this->assertTrue($this->clickSubmit($lang['strcancel']));
@@ -190,7 +190,7 @@ class TriggersTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'trigger' => 'changed_trigger'])
+ 'trigger' => 'changed_trigger', ])
);
$this->assertTrue($this->clickSubmit($lang['strno']));
@@ -214,7 +214,7 @@ class TriggersTest extends PreconditionSet
'database' => $DATABASE,
'schema' => 'public',
'table' => 'student',
- 'trigger' => 'changed_trigger'])
+ 'trigger' => 'changed_trigger', ])
);
$this->assertTrue($this->setField('cascade', true));
$this->assertTrue($this->clickSubmit($lang['stryes']));
diff --git a/tests/simpletest/tests.php b/tests/simpletest/tests.php
index bbe36cce..f144ec24 100644
--- a/tests/simpletest/tests.php
+++ b/tests/simpletest/tests.php
@@ -3,12 +3,12 @@
/**
* PHPPgAdmin v6.0.0-beta.44
*/
-require_once __DIR__ . '/../../src/lib.inc.php';
-require_once __DIR__ . '/../../src/lang/english.php';
+require_once __DIR__.'/../../src/lib.inc.php';
+require_once __DIR__.'/../../src/lang/english.php';
require_once 'config.tests.php';
-set_include_path($PHP_SIMPLETEST_HOME . ':' . './testcase' . ':' . get_include_path());
+set_include_path($PHP_SIMPLETEST_HOME.':'.'./testcase'.':'.get_include_path());
$run = true;
@@ -30,5 +30,4 @@ if ($run) {
'include path' => get_include_path(),
]);
echo '</pre>';
-
}
diff --git a/tests/unit/ViewTest.php b/tests/unit/ViewTest.php
index 178eeeb2..28d8aa78 100644
--- a/tests/unit/ViewTest.php
+++ b/tests/unit/ViewTest.php
@@ -17,6 +17,7 @@ class ViewTest extends \Codeception\Test\Unit
{
$Helper = $this->getModule('\Helper\Unit');
$this->container = $Helper->getContainer();
+ $this->container->misc->setNoDBConnection(true);
//\Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
}
@@ -29,352 +30,308 @@ class ViewTest extends \Codeception\Test\Unit
public function testAcinsertView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/acinsert.php';
- $this->assertTrue($controller->controller_name == 'AcinsertController');
+ $this->assertSame($controller->controller_name, 'AcinsertController', 'controller name should be AcinsertController');
}
public function testAggregatesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/aggregates.php';
- $this->assertTrue($controller->controller_name == 'AggregatesController');
+ $this->assertSame($controller->controller_name, 'AggregatesController', 'controller name should be AggregatesController');
}
public function testAlldbView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/alldb.php';
- $this->assertTrue($controller->controller_name == 'AlldbController');
+ $this->assertSame($controller->controller_name, 'AlldbController', 'controller name should be AlldbController');
}
public function testBrowserView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/browser.php';
- $this->assertTrue($controller->controller_name == 'BrowserController');
+ $this->assertSame($controller->controller_name, 'BrowserController', 'controller name should be BrowserController');
}
public function testCastsView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/casts.php';
- $this->assertTrue($controller->controller_name == 'CastsController');
+ $this->assertSame($controller->controller_name, 'CastsController', 'controller name should be CastsController');
}
public function testColpropertiesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/colproperties.php';
- $this->assertTrue($controller->controller_name == 'ColpropertiesController');
+ $this->assertSame($controller->controller_name, 'ColpropertiesController', 'controller name should be ColpropertiesController');
}
public function testConstraintsView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/constraints.php';
- $this->assertTrue($controller->controller_name == 'ConstraintsController');
+ $this->assertSame($controller->controller_name, 'ConstraintsController', 'controller name should be ConstraintsController');
}
public function testConversionsView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/conversions.php';
- $this->assertTrue($controller->controller_name == 'ConversionsController');
+ $this->assertSame($controller->controller_name, 'ConversionsController', 'controller name should be ConversionsController');
}
public function testDatabaseView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/database.php';
- $this->assertTrue($controller->controller_name == 'DatabaseController');
+ $this->assertSame($controller->controller_name, 'DatabaseController', 'controller name should be DatabaseController');
}
public function testDataexportView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/dataexport.php';
- $this->assertTrue($controller->controller_name == 'DataexportController');
+ $this->assertSame($controller->controller_name, 'DataexportController', 'controller name should be DataexportController');
}
public function testDataimportView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/dataimport.php';
- $this->assertTrue($controller->controller_name == 'DataimportController');
+ $this->assertSame($controller->controller_name, 'DataimportController', 'controller name should be DataimportController');
}
public function testDbexportView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/dbexport.php';
- $this->assertTrue($controller->controller_name == 'DbexportController');
+ $this->assertSame($controller->controller_name, 'DbexportController', 'controller name should be DbexportController');
}
public function testDisplayView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/display.php';
- $this->assertTrue($controller->controller_name == 'DisplayController');
+ $this->assertSame($controller->controller_name, 'DisplayController', 'controller name should be DisplayController');
}
public function testDomainsView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/domains.php';
- $this->assertTrue($controller->controller_name == 'DomainsController');
+ $this->assertSame($controller->controller_name, 'DomainsController', 'controller name should be DomainsController');
}
public function testFulltextView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/fulltext.php';
- $this->assertTrue($controller->controller_name == 'FulltextController');
+ $this->assertSame($controller->controller_name, 'FulltextController', 'controller name should be FulltextController');
}
public function testFunctionsView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/functions.php';
- $this->assertTrue($controller->controller_name == 'FunctionsController');
+ $this->assertSame($controller->controller_name, 'FunctionsController', 'controller name should be FunctionsController');
}
public function testGroupsView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/groups.php';
- $this->assertTrue($controller->controller_name == 'GroupsController');
+ $this->assertSame($controller->controller_name, 'GroupsController', 'controller name should be GroupsController');
}
public function testHelpView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/help.php';
- $this->assertTrue($controller->controller_name == 'HelpController');
+ $this->assertSame($controller->controller_name, 'HelpController', 'controller name should be HelpController');
}
public function testHistoryView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/history.php';
- $this->assertTrue($controller->controller_name == 'HistoryController');
+ $this->assertSame($controller->controller_name, 'HistoryController', 'controller name should be HistoryController');
}
public function testIndexesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/indexes.php';
- $this->assertTrue($controller->controller_name == 'IndexesController');
+ $this->assertSame($controller->controller_name, 'IndexesController', 'controller name should be IndexesController');
}
public function testInfoView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/info.php';
- $this->assertTrue($controller->controller_name == 'InfoController');
+ $this->assertSame($controller->controller_name, 'InfoController', 'controller name should be InfoController');
}
public function testIntroView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/intro.php';
- $this->assertTrue($controller->controller_name == 'IntroController');
+ $this->assertSame($controller->controller_name, 'IntroController', 'controller name should be IntroController');
}
public function testLanguagesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/languages.php';
- $this->assertTrue($controller->controller_name == 'LanguagesController');
+ $this->assertSame($controller->controller_name, 'LanguagesController', 'controller name should be LanguagesController');
}
public function testLoginView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/login.php';
- $this->assertTrue($controller->controller_name == 'LoginController');
+ $this->assertSame($controller->controller_name, 'LoginController', 'controller name should be LoginController');
}
public function testMaterializedviewpropertiesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/materializedviewproperties.php';
- $this->assertTrue($controller->controller_name == 'MaterializedviewpropertiesController');
+ $this->assertSame($controller->controller_name, 'MaterializedviewpropertiesController', 'controller name should be MaterializedviewpropertiesController');
}
public function testMaterializedviewsView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/materializedviews.php';
- $this->assertTrue($controller->controller_name == 'MaterializedviewsController');
+ $this->assertSame($controller->controller_name, 'MaterializedviewsController', 'controller name should be MaterializedviewsController');
}
public function testOpclassesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/opclasses.php';
- $this->assertTrue($controller->controller_name == 'OpclassesController');
+ $this->assertSame($controller->controller_name, 'OpclassesController', 'controller name should be OpclassesController');
}
public function testOperatorsView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/operators.php';
- $this->assertTrue($controller->controller_name == 'OperatorsController');
+ $this->assertSame($controller->controller_name, 'OperatorsController', 'controller name should be OperatorsController');
}
public function testPrivilegesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/privileges.php';
- $this->assertTrue($controller->controller_name == 'PrivilegesController');
+ $this->assertSame($controller->controller_name, 'PrivilegesController', 'controller name should be PrivilegesController');
}
public function testRolesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/roles.php';
- $this->assertTrue($controller->controller_name == 'RolesController');
+ $this->assertSame($controller->controller_name, 'RolesController', 'controller name should be RolesController');
}
public function testRulesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/rules.php';
- $this->assertTrue($controller->controller_name == 'RulesController');
+ $this->assertSame($controller->controller_name, 'RulesController', 'controller name should be RulesController');
}
public function testSchemasView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/schemas.php';
- $this->assertTrue($controller->controller_name == 'SchemasController');
+ $this->assertSame($controller->controller_name, 'SchemasController', 'controller name should be SchemasController');
}
public function testSequencesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/sequences.php';
- $this->assertTrue($controller->controller_name == 'SequencesController');
+ $this->assertSame($controller->controller_name, 'SequencesController', 'controller name should be SequencesController');
}
public function testServersView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/servers.php';
- $this->assertTrue($controller->controller_name == 'ServersController');
+ $this->assertSame($controller->controller_name, 'ServersController', 'controller name should be ServersController');
}
public function testSqleditView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/sqledit.php';
- $this->assertTrue($controller->controller_name == 'SqleditController');
+ $this->assertSame($controller->controller_name, 'SqleditController', 'controller name should be SqleditController');
}
public function testSqlView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/sql.php';
- $this->assertTrue($controller->controller_name == 'SqlController');
+ $this->assertSame($controller->controller_name, 'SqlController', 'controller name should be SqlController');
}
public function testTablespacesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/tablespaces.php';
- $this->assertTrue($controller->controller_name == 'TablespacesController');
+ $this->assertSame($controller->controller_name, 'TablespacesController', 'controller name should be TablespacesController');
}
public function testTablesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/tables.php';
- $this->assertTrue($controller->controller_name == 'TablesController');
+ $this->assertSame($controller->controller_name, 'TablesController', 'controller name should be TablesController');
}
public function testTblpropertiesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/tblproperties.php';
- $this->assertTrue($controller->controller_name == 'TblpropertiesController');
+ $this->assertSame($controller->controller_name, 'TblpropertiesController', 'controller name should be TblpropertiesController');
}
public function testTriggersView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/triggers.php';
- $this->assertTrue($controller->controller_name == 'TriggersController');
+ $this->assertSame($controller->controller_name, 'TriggersController', 'controller name should be TriggersController');
}
public function testTypesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/types.php';
- $this->assertTrue($controller->controller_name == 'TypesController');
+ $this->assertSame($controller->controller_name, 'TypesController', 'controller name should be TypesController');
}
public function testUsersView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/users.php';
- $this->assertTrue($controller->controller_name == 'UsersController');
+ $this->assertSame($controller->controller_name, 'UsersController', 'controller name should be UsersController');
}
public function testViewpropertiesView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/viewproperties.php';
- $this->assertTrue($controller->controller_name == 'ViewpropertiesController');
+ $this->assertSame($controller->controller_name, 'ViewpropertiesController', 'controller name should be ViewpropertiesController');
}
public function testViewsView()
{
$container = $this->container;
- $container->misc->setNoDBConnection(true);
require BASE_PATH.'/tests/views/views.php';
- $this->assertTrue($controller->controller_name == 'ViewsController');
+ $this->assertSame($controller->controller_name, 'ViewsController', 'controller name should be ViewsController');
}
}
diff --git a/tests/views/browser.php b/tests/views/browser.php
index 218387a3..1acd0dd8 100644
--- a/tests/views/browser.php
+++ b/tests/views/browser.php
@@ -8,7 +8,7 @@ if (!defined('BASE_PATH')) {
require_once '../../src/lib.inc.php';
$do_render = true;
}
-$controller = new \PHPPgAdmin\Controller\BrowserController($container, true);
+$controller = new \PHPPgAdmin\Controller\BrowserController($container);
if ($do_render) {
$controller->render();
}
diff --git a/tests/views/intro.php b/tests/views/intro.php
index 03aee234..7174dc46 100644
--- a/tests/views/intro.php
+++ b/tests/views/intro.php
@@ -8,7 +8,7 @@ if (!defined('BASE_PATH')) {
require_once '../../src/lib.inc.php';
$do_render = true;
}
-$controller = new \PHPPgAdmin\Controller\IntroController($container, true);
+$controller = new \PHPPgAdmin\Controller\IntroController($container);
if ($do_render) {
$controller->render();
}
diff --git a/tests/views/login.php b/tests/views/login.php
index 26df26fb..1e942d41 100644
--- a/tests/views/login.php
+++ b/tests/views/login.php
@@ -8,7 +8,7 @@ if (!defined('BASE_PATH')) {
require_once '../../src/lib.inc.php';
$do_render = true;
}
-$controller = new \PHPPgAdmin\Controller\LoginController($container, true);
+$controller = new \PHPPgAdmin\Controller\LoginController($container);
if ($do_render) {
$controller->render();
}
diff --git a/tests/views/servers.php b/tests/views/servers.php
index 218dd67e..e657ab9a 100644
--- a/tests/views/servers.php
+++ b/tests/views/servers.php
@@ -8,11 +8,7 @@ if (!defined('BASE_PATH')) {
require_once '../../src/lib.inc.php';
$do_render = true;
}
-$controller = new \PHPPgAdmin\Controller\ServersController($container, true);
+$controller = new \PHPPgAdmin\Controller\ServersController($container);
if ($do_render) {
$controller->render();
-
- //$new_location = str_replace('.php', '', $container->environment->get('REQUEST_URI'));
- //header('HTTP/1.1 301 Moved Permanently');
- //header("Location: $new_location");
}