From 184316d891816c15abc3a077e6f2942de147f44e Mon Sep 17 00:00:00 2001
From: Madhura Jayaratne DROP TABLE / VIEW / PROCEDURE / FUNCTION' .
+ 'Add DROP TABLE / VIEW / PROCEDURE / FUNCTION' .
' / EVENT statement',
$leaf->getText()
);
@@ -326,13 +326,13 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::setProperties
- *
+ *
* @return void
*/
public function testSetPropertiesWithDrizzle()
{
$restoreDrizzle = $restoreMySQLIntVersion = 'PMANORESTORE';
-
+
if (!PMA_DRIZZLE || PMA_MYSQL_INT_VERSION > 50100) {
if (!PMA_HAS_RUNKIT) {
$this->markTestSkipped(
@@ -345,7 +345,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
}
if (PMA_MYSQL_INT_VERSION > 50100) {
$restoreMySQLIntVersion = PMA_MYSQL_INT_VERSION;
- runkit_constant_redefine('PMA_MYSQL_INT_VERSION', 50000);
+ runkit_constant_redefine('PMA_MYSQL_INT_VERSION', 50000);
}
}
}
@@ -364,9 +364,9 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
$properties = $attrProperties->getValue($this->object);
$options = $properties->getOptions();
-
+
$generalOptionsArray = $options->getProperties();
-
+
$this->assertCount(
3,
$generalOptionsArray
@@ -435,7 +435,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
$structOption = $generalOptionsArray[1];
$properties = $structOption->getProperties();
$subgroupProps = $properties[0]->getProperties();
-
+
$this->assertContains(
'DROP TABLE',
$subgroupProps[0]->getText()
@@ -454,7 +454,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportRoutines
- *
+ *
* @return void
*/
public function testExportRoutines()
@@ -504,14 +504,14 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::_exportComment
- *
+ *
* @return void
*/
public function testExportComment()
{
$method = new ReflectionMethod('ExportSql', '_exportComment');
$method->setAccessible(true);
-
+
$GLOBALS['crlf'] = '##';
$GLOBALS['sql_include_comments'] = true;
@@ -526,7 +526,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
);
$GLOBALS['sql_include_comments'] = false;
-
+
$this->assertEquals(
'',
$method->invoke($this->object, 'Comment')
@@ -542,14 +542,14 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::_possibleCRLF
- *
+ *
* @return void
*/
public function testPossibleCRLF()
{
$method = new ReflectionMethod('ExportSql', '_possibleCRLF');
$method->setAccessible(true);
-
+
$GLOBALS['crlf'] = '##';
$GLOBALS['sql_include_comments'] = true;
@@ -564,7 +564,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
);
$GLOBALS['sql_include_comments'] = false;
-
+
$this->assertEquals(
'',
$method->invoke($this->object, 'Comment')
@@ -580,7 +580,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportFooter
- *
+ *
* @return void
*/
public function testExportFooter()
@@ -614,7 +614,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
$dbi->expects($this->once())
->method('query')
->with('SET time_zone = "GMT"');
-
+
$GLOBALS['dbi'] = $dbi;
$this->expectOutputString(
@@ -636,7 +636,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportHeader
- *
+ *
* @return void
*/
public function testExportHeader()
@@ -686,7 +686,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
$dbi->expects($this->once())
->method('query')
->with('SET time_zone = "+00:00"');
-
+
$GLOBALS['dbi'] = $dbi;
ob_start();
@@ -704,12 +704,12 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
'h2C',
$result
);
-
+
$this->assertContains(
"SET FOREIGN_KEY_CHECKS=0;\n",
$result
);
-
+
$this->assertContains(
"40101 SET",
$result
@@ -719,7 +719,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
"SET FOREIGN_KEY_CHECKS=0;\n" .
"SET SQL_MODE = \"NO_AUTO_VALUE_ON_ZERO\";\n" .
"SET AUTOCOMMIT = 0;\n" .
- "START TRANSACTION;\n" .
+ "START TRANSACTION;\n" .
"SET time_zone = \"+00:00\";\n",
$result
);
@@ -732,7 +732,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportDBCreate
- *
+ *
* @return void
*/
public function testExportDBCreate()
@@ -816,7 +816,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportDBHeader
- *
+ *
* @return void
*/
public function testExportDBHeader()
@@ -825,7 +825,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
$GLOBALS['sql_backquotes'] = '';
$GLOBALS['sql_include_comments'] = true;
$GLOBALS['crlf'] = "\n";
-
+
ob_start();
$this->assertTrue(
$this->object->exportDBHeader('testDB')
@@ -840,7 +840,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
// case 2
unset($GLOBALS['sql_compatibility']);
unset($GLOBALS['sql_backquotes']);
-
+
ob_start();
$this->assertTrue(
$this->object->exportDBHeader('testDB')
@@ -855,7 +855,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportDBFooter
- *
+ *
* @return void
*/
public function testExportDBFooterWithNewerMySQLVersion()
@@ -940,7 +940,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportDBFooter
- *
+ *
* @return void
*/
public function testExportDBFooterWithOlderMySQLVersion()
@@ -987,7 +987,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::getTableDefStandIn
- *
+ *
* @return void
*/
public function testGetTableDefStandIn()
@@ -1025,7 +1025,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::_getTableDefForView
- *
+ *
* @return void
*/
public function testGetTableDefForView()
@@ -1105,7 +1105,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::getTableDef
- *
+ *
* @return void
*/
public function testGetTableDefWithoutDrizzle()
@@ -1189,7 +1189,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
"CREATE TABLE `db`.`table`,\n CONSTRAINT KEYS \nFOREIGN KEY\n) " .
"unsigned NOT NULL\n(\r\n"
);
-
+
$dbi->expects($this->once())
->method('fetchRow')
->with('res')
@@ -1241,7 +1241,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
'-- Constraints for table "table"',
$GLOBALS['sql_constraints']
);
-
+
$this->assertContains(
'ALTER TABLE "table"' . "\n",
$GLOBALS['sql_constraints']
@@ -1271,7 +1271,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
'ALTER TABLE "db"."table"' . "\n",
$GLOBALS['sql_drop_foreign_keys']
);
-
+
$this->assertContains(
'DROP FOREIGN KEY KEYS',
$GLOBALS['sql_drop_foreign_keys']
@@ -1284,7 +1284,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::getTableDef
- *
+ *
* @return void
*/
public function testGetTableDefWithDrizzle()
@@ -1366,7 +1366,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
"CREATE TABLE `db`.`table` ROW_FORMAT='row',\n CONSTRAINT "
. "KEYS \nFOREIGN KEY\n) unsigned NOT NULL\n(\r"
);
-
+
$dbi->expects($this->once())
->method('fetchRow')
->with('res')
@@ -1398,7 +1398,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
'-- Constraints for table',
$GLOBALS['sql_constraints']
);
-
+
$this->assertNotContains(
'-- Constraints for table "table"',
$GLOBALS['sql_constraints']
@@ -1411,7 +1411,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::getTableDef
- *
+ *
* @return void
*/
public function testGetTableDefWithError()
@@ -1514,7 +1514,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::_getTableComments
- *
+ *
* @return void
*/
public function testGetTableComments()
@@ -1585,12 +1585,12 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportStructure
- *
+ *
* @return void
*/
public function testExportStructure()
{
-
+
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')
->disableOriginalConstructor()
->getMock();
@@ -1651,7 +1651,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
'dumpText1',
$result
);
-
+
// case 2
unset($GLOBALS['sql_compatibility']);
unset($GLOBALS['sql_backquotes']);
@@ -1747,7 +1747,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportData
- *
+ *
* @return void
*/
public function testExportData()
@@ -1879,7 +1879,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportData
- *
+ *
* @return void
*/
public function testExportDataWithUpdate()
@@ -1973,7 +1973,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportData
- *
+ *
* @return void
*/
public function testExportDataWithIsView()
@@ -2011,7 +2011,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::exportData
- *
+ *
* @return void
*/
public function testExportDataWithError()
@@ -2044,12 +2044,12 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportSql::_makeCreateTableMSSQLCompatible
- *
+ *
* @return void
*/
public function testMakeCreateTableMSSQLCompatible()
{
-
+
$query = "CREATE TABLE IF NOT EXISTS (\" date DEFAULT NULL,\n" .
"\" date DEFAULT NULL\n\" date NOT NULL,\n\" date NOT NULL\n," .
" \" date NOT NULL DEFAULT 'asd'," .
@@ -2066,7 +2066,7 @@ class PMA_ExportSql_Test extends PHPUnit_Framework_TestCase
" \" float(22,2,) NOT NULL,\n" .
" \" double NOT NULL\n" .
" \" double NOT NULL DEFAULT '213'\n";
-
+
$method = new ReflectionMethod(
'ExportSql', '_makeCreateTableMSSQLCompatible'
);
diff --git a/test/classes/plugin/export/PMA_ExportTexytext_test.php b/test/classes/plugin/export/PMA_ExportTexytext_test.php
index 733a46ae94..b07ffe9123 100644
--- a/test/classes/plugin/export/PMA_ExportTexytext_test.php
+++ b/test/classes/plugin/export/PMA_ExportTexytext_test.php
@@ -42,7 +42,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
public function tearDown()
@@ -52,7 +52,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportTexytext::setProperties
- *
+ *
* @return void
*/
public function testSetProperties()
@@ -124,7 +124,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
'RadioPropertyItem',
$property
);
-
+
$generalOptions = array_shift($generalOptionsArray);
$this->assertInstanceOf(
@@ -145,7 +145,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
'BoolPropertyItem',
$property
);
-
+
$this->assertEquals(
'columns',
$property->getName()
@@ -157,7 +157,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
'TextPropertyItem',
$property
);
-
+
$this->assertEquals(
'null',
$property->getName()
@@ -166,7 +166,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportTexytext::exportHeader
- *
+ *
* @return void
*/
public function testExportHeader()
@@ -178,7 +178,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportTexytext::exportFooter
- *
+ *
* @return void
*/
public function testExportFooter()
@@ -190,7 +190,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportTexytext::exportDBHeader
- *
+ *
* @return void
*/
public function testExportDBHeader()
@@ -205,7 +205,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportTexytext::exportDBFooter
- *
+ *
* @return void
*/
public function testExportDBFooter()
@@ -217,7 +217,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportTexytext::exportDBCreate
- *
+ *
* @return void
*/
public function testExportDBCreate()
@@ -229,7 +229,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportTexytext::exportData
- *
+ *
* @return void
*/
public function testExportData()
@@ -287,12 +287,12 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
"|>|0|test",
$result
);
-
+
}
/**
* Test for ExportTexytext::getTableDefStandIn
- *
+ *
* @return void
*/
public function testGetTableDefStandIn()
@@ -353,7 +353,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportTexytext::getTableDef
- *
+ *
* @return void
*/
public function testGetTableDef()
@@ -419,7 +419,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
)
);
-
+
$columns = array(
'Field' => 'fname',
'Comment' => 'comm'
@@ -429,7 +429,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
->method('getColumns')
->with('db', 'table')
->will($this->returnValue(array($columns)));
-
+
$GLOBALS['dbi'] = $dbi;
$this->object->expects($this->exactly(1))
@@ -465,7 +465,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
/**
* Test for ExportTexytext::getTriggers
- *
+ *
* @return void
*/
public function testGetTriggers()
@@ -482,7 +482,7 @@ class PMA_ExportTexytext_Test extends PHPUnit_Framework_TestCase
'definition' => 'def'
)
);
-
+
$dbi->expects($this->once())
->method('getTriggers')
->with('database', 'ta';
diff --git a/test/classes/plugin/transformations/Text_Plain_Append_test.php b/test/classes/plugin/transformations/Text_Plain_Append_test.php
index b5abf2a0c2..6a74066060 100644
--- a/test/classes/plugin/transformations/Text_Plain_Append_test.php
+++ b/test/classes/plugin/transformations/Text_Plain_Append_test.php
@@ -34,7 +34,7 @@ class Text_Plain_Append_Test extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
- $this->object = new Text_Plain_Append(new PluginManager());
+ $this->object = new Text_Plain_Append(new PluginManager());
}
/**
@@ -48,7 +48,7 @@ class Text_Plain_Append_Test extends PHPUnit_Framework_TestCase
{
unset($this->object);
}
-
+
/**
* Test for getInfo
*
@@ -58,14 +58,14 @@ class Text_Plain_Append_Test extends PHPUnit_Framework_TestCase
*/
public function testGetInfo()
{
- $info = 'Appends text to a string. The only option is '
+ $info = 'Appends text to a string. The only option is '
. 'the text to be appended'
- . ' (enclosed in single quotes, default empty string).';
+ . ' (enclosed in single quotes, default empty string).';
$this->assertEquals(
$info,
Text_Plain_Append::getInfo()
- );
-
+ );
+
}
/**
@@ -76,11 +76,11 @@ class Text_Plain_Append_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testGetName()
- {
+ {
$this->assertEquals(
"Append",
Text_Plain_Append::getName()
- );
+ );
}
/**
@@ -91,11 +91,11 @@ class Text_Plain_Append_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testGetMIMEType()
- {
+ {
$this->assertEquals(
"Text",
Text_Plain_Append::getMIMEType()
- );
+ );
}
/**
@@ -106,11 +106,11 @@ class Text_Plain_Append_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testGetMIMESubtype()
- {
+ {
$this->assertEquals(
"Plain",
Text_Plain_Append::getMIMESubtype()
- );
+ );
}
/**
@@ -127,19 +127,19 @@ class Text_Plain_Append_Test extends PHPUnit_Framework_TestCase
$this->assertEquals(
"PMA_BUFFERoption1",
$this->object->applyTransformation($buffer, $options)
- );
+ );
//no options
$result = "PMA_BUFFER";
$this->assertEquals(
$result,
$this->object->applyTransformation($buffer)
);
- //html string
+ //html string
$result = "PMA_BUFFER<a>abc</a>";
$options = array("abc");
$this->assertEquals(
$result,
$this->object->applyTransformation($buffer, $options)
- );
+ );
}
}
diff --git a/test/classes/plugin/transformations/Text_Plain_Dateformat_test.php b/test/classes/plugin/transformations/Text_Plain_Dateformat_test.php
index d7b22fe0c3..6c689c4711 100644
--- a/test/classes/plugin/transformations/Text_Plain_Dateformat_test.php
+++ b/test/classes/plugin/transformations/Text_Plain_Dateformat_test.php
@@ -165,7 +165,7 @@ class Text_Plain_Dateformat_Test extends PHPUnit_Framework_TestCase
//string
$timestamp = "20100201";
- $result = ''
+ $result = ''
. 'Feb 01, 2010 at 12:00 AM';
$this->assertEquals(
$result,
diff --git a/test/classes/plugin/transformations/Text_Plain_External_test.php b/test/classes/plugin/transformations/Text_Plain_External_test.php
index 8824ea1e42..c9a79accd4 100644
--- a/test/classes/plugin/transformations/Text_Plain_External_test.php
+++ b/test/classes/plugin/transformations/Text_Plain_External_test.php
@@ -156,8 +156,8 @@ class Text_Plain_External_Test extends PHPUnit_Framework_TestCase
$this->object->applyTransformationNoWrap($options)
);
$options = array(
- "/dev/null -i -wrap -q",
- "/dev/null -i -wrap -q",
+ "/dev/null -i -wrap -q",
+ "/dev/null -i -wrap -q",
"/dev/null -i -wrap -q", 1
);
$this->assertEquals(
@@ -165,8 +165,8 @@ class Text_Plain_External_Test extends PHPUnit_Framework_TestCase
$this->object->applyTransformationNoWrap($options)
);
$options = array(
- "/dev/null -i -wrap -q",
- "/dev/null -i -wrap -q",
+ "/dev/null -i -wrap -q",
+ "/dev/null -i -wrap -q",
"/dev/null -i -wrap -q", "1"
);
$this->assertEquals(
@@ -174,9 +174,9 @@ class Text_Plain_External_Test extends PHPUnit_Framework_TestCase
$this->object->applyTransformationNoWrap($options)
);
$options = array(
- "/dev/null -i -wrap -q",
- "/dev/null -i -wrap -q",
- "/dev/null -i -wrap -q",
+ "/dev/null -i -wrap -q",
+ "/dev/null -i -wrap -q",
+ "/dev/null -i -wrap -q",
2
);
$this->assertEquals(
diff --git a/test/classes/plugin/transformations/Text_Plain_Imagelink_test.php b/test/classes/plugin/transformations/Text_Plain_Imagelink_test.php
index 1fccd50990..19c48a6c37 100644
--- a/test/classes/plugin/transformations/Text_Plain_Imagelink_test.php
+++ b/test/classes/plugin/transformations/Text_Plain_Imagelink_test.php
@@ -60,7 +60,7 @@ class Text_Plain_Imagelink_Test extends PHPUnit_Framework_TestCase
{
$info = 'Displays an image and a link; '
. 'the column contains the filename. The first option'
- . ' is a URL prefix like "http://www.example.com/". '
+ . ' is a URL prefix like "http://www.example.com/". '
. 'The second and third options'
. ' are the width and the height in pixels.';
$this->assertEquals(
diff --git a/test/classes/plugin/transformations/Text_Plain_Longtoipv4_test.php b/test/classes/plugin/transformations/Text_Plain_Longtoipv4_test.php
index 7b8afeec57..60418cbf87 100644
--- a/test/classes/plugin/transformations/Text_Plain_Longtoipv4_test.php
+++ b/test/classes/plugin/transformations/Text_Plain_Longtoipv4_test.php
@@ -35,7 +35,7 @@ class Text_Plain_Longtoipv4_Test extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
- $this->object = new Text_Plain_Longtoipv4(new PluginManager());
+ $this->object = new Text_Plain_Longtoipv4(new PluginManager());
}
/**
@@ -49,7 +49,7 @@ class Text_Plain_Longtoipv4_Test extends PHPUnit_Framework_TestCase
{
unset($this->object);
}
-
+
/**
* Test for getInfo
*
@@ -60,12 +60,12 @@ class Text_Plain_Longtoipv4_Test extends PHPUnit_Framework_TestCase
public function testGetInfo()
{
$info = 'Converts an (IPv4) Internet network address into a string in'
- . ' Internet standard dotted format.';
+ . ' Internet standard dotted format.';
$this->assertEquals(
$info,
Text_Plain_Longtoipv4::getInfo()
- );
-
+ );
+
}
/**
@@ -76,11 +76,11 @@ class Text_Plain_Longtoipv4_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testGetName()
- {
+ {
$this->assertEquals(
"Long To IPv4",
Text_Plain_Longtoipv4::getName()
- );
+ );
}
/**
@@ -91,11 +91,11 @@ class Text_Plain_Longtoipv4_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testGetMIMEType()
- {
+ {
$this->assertEquals(
"Text",
Text_Plain_Longtoipv4::getMIMEType()
- );
+ );
}
/**
@@ -106,11 +106,11 @@ class Text_Plain_Longtoipv4_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testGetMIMESubtype()
- {
+ {
$this->assertEquals(
"Plain",
Text_Plain_Longtoipv4::getMIMESubtype()
- );
+ );
}
/**
@@ -127,14 +127,14 @@ class Text_Plain_Longtoipv4_Test extends PHPUnit_Framework_TestCase
$this->assertEquals(
"2.143.92.40",
$this->object->applyTransformation($buffer, $options)
- );
-
- //too big
+ );
+
+ //too big
$buffer = 4294967295;
$options = array("option1", "option2");
$this->assertEquals(
"255.255.255.255",
$this->object->applyTransformation($buffer, $options)
- );
+ );
}
}
diff --git a/test/classes/plugin/transformations/Text_Plain_Substring_test.php b/test/classes/plugin/transformations/Text_Plain_Substring_test.php
index 05daea86b9..51be484ba2 100644
--- a/test/classes/plugin/transformations/Text_Plain_Substring_test.php
+++ b/test/classes/plugin/transformations/Text_Plain_Substring_test.php
@@ -35,7 +35,7 @@ class Text_Plain_Substring_Test extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
- $this->object = new Text_Plain_Substring(new PluginManager());
+ $this->object = new Text_Plain_Substring(new PluginManager());
}
/**
@@ -63,11 +63,11 @@ class Text_Plain_Substring_Test extends PHPUnit_Framework_TestCase
. ' characters to skip from the beginning of the string (Default 0).'
. ' The second option is the number of characters to return (Default:'
. ' until end of string). The third option is the string to append';
-
+
$this->assertContains(
$info,
Text_Plain_Substring::getInfo()
- );
+ );
}
/**
@@ -78,11 +78,11 @@ class Text_Plain_Substring_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testGetName()
- {
+ {
$this->assertEquals(
"Substring",
Text_Plain_Substring::getName()
- );
+ );
}
/**
@@ -93,11 +93,11 @@ class Text_Plain_Substring_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testGetMIMEType()
- {
+ {
$this->assertEquals(
"Text",
Text_Plain_Substring::getMIMEType()
- );
+ );
}
/**
@@ -108,11 +108,11 @@ class Text_Plain_Substring_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testGetMIMESubtype()
- {
+ {
$this->assertEquals(
"Plain",
Text_Plain_Substring::getMIMESubtype()
- );
+ );
}
/**
@@ -129,6 +129,6 @@ class Text_Plain_Substring_Test extends PHPUnit_Framework_TestCase
$this->assertEquals(
"suffixMA_suffix",
$this->object->applyTransformation($buffer, $options)
- );
+ );
}
}
diff --git a/test/classes/properties/PMA_PorpertyItem_test.php b/test/classes/properties/PMA_PorpertyItem_test.php
index 13ae842d9b..90c8118856 100644
--- a/test/classes/properties/PMA_PorpertyItem_test.php
+++ b/test/classes/properties/PMA_PorpertyItem_test.php
@@ -10,7 +10,7 @@ require_once 'libraries/properties/PropertyItem.class.php';
/**
* Tests for PropertyItem class
- *
+ *
* @package PhpMyAdmin-test
*/
class PMA_PropertyItem_Test extends PHPUnit_Framework_TestCase
@@ -29,7 +29,7 @@ class PMA_PropertyItem_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
public function tearDown()
@@ -39,7 +39,7 @@ class PMA_PropertyItem_Test extends PHPUnit_Framework_TestCase
/**
* Test for PropertyItem::getGroup
- *
+ *
* @return void
*/
public function testGetGroup()
diff --git a/test/classes/properties/options/PMA_OptionsPropertyGroup_test.php b/test/classes/properties/options/PMA_OptionsPropertyGroup_test.php
index 134a0f9c0b..7e4ebcb702 100644
--- a/test/classes/properties/options/PMA_OptionsPropertyGroup_test.php
+++ b/test/classes/properties/options/PMA_OptionsPropertyGroup_test.php
@@ -10,7 +10,7 @@ require_once 'libraries/properties/options/OptionsPropertyGroup.class.php';
/**
* Tests for OptionsPropertyGroup class
- *
+ *
* @package PhpMyAdmin-test
*/
class PMA_OptionsPropertyGroup_Test extends PHPUnit_Framework_TestCase
@@ -29,7 +29,7 @@ class PMA_OptionsPropertyGroup_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
public function tearDown()
@@ -39,7 +39,7 @@ class PMA_OptionsPropertyGroup_Test extends PHPUnit_Framework_TestCase
/**
* Test for OptionsPropertyGroup::addProperty
- *
+ *
* @return void
*/
public function testAddProperty()
@@ -63,7 +63,7 @@ class PMA_OptionsPropertyGroup_Test extends PHPUnit_Framework_TestCase
/**
* Test for OptionsPropertyGroup::removeProperty
- *
+ *
* @return void
*/
public function testRemoveProperty()
@@ -95,7 +95,7 @@ class PMA_OptionsPropertyGroup_Test extends PHPUnit_Framework_TestCase
/**
* Test for OptionsPropertyGroup::getGroup
- *
+ *
* @return void
*/
public function testGetGroup()
@@ -108,7 +108,7 @@ class PMA_OptionsPropertyGroup_Test extends PHPUnit_Framework_TestCase
/**
* Test for OptionsPropertyGroup::getProperties
- *
+ *
* @return void
*/
public function testGetProperties()
@@ -125,7 +125,7 @@ class PMA_OptionsPropertyGroup_Test extends PHPUnit_Framework_TestCase
/**
* Test for OptionsPropertyGroup::getProperties
- *
+ *
* @return void
*/
public function testGetNrOfProperties()
diff --git a/test/classes/properties/options/PMA_OptionsPropertyItem_test.php b/test/classes/properties/options/PMA_OptionsPropertyItem_test.php
index 52a2b19833..fd77bb185e 100644
--- a/test/classes/properties/options/PMA_OptionsPropertyItem_test.php
+++ b/test/classes/properties/options/PMA_OptionsPropertyItem_test.php
@@ -10,7 +10,7 @@ require_once 'libraries/properties/options/OptionsPropertyItem.class.php';
/**
* Tests for OptionsPropertyItem class
- *
+ *
* @package PhpMyAdmin-test
*/
class PMA_OptionsPropertyItem_Test extends PHPUnit_Framework_TestCase
@@ -29,7 +29,7 @@ class PMA_OptionsPropertyItem_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
public function tearDown()
@@ -41,7 +41,7 @@ class PMA_OptionsPropertyItem_Test extends PHPUnit_Framework_TestCase
* Test for
* - OptionsPropertyItem::getName
* - OptionsPropertyItem::setName
- *
+ *
* @return void
*/
public function testGetSetName()
@@ -58,7 +58,7 @@ class PMA_OptionsPropertyItem_Test extends PHPUnit_Framework_TestCase
* Test for
* - OptionsPropertyItem::getText
* - OptionsPropertyItem::setText
- *
+ *
* @return void
*/
public function testGetSetText()
@@ -75,7 +75,7 @@ class PMA_OptionsPropertyItem_Test extends PHPUnit_Framework_TestCase
* Test for
* - OptionsPropertyItem::getForce
* - OptionsPropertyItem::setForce
- *
+ *
* @return void
*/
public function testGetSetForce()
@@ -90,7 +90,7 @@ class PMA_OptionsPropertyItem_Test extends PHPUnit_Framework_TestCase
/**
* Test for OptionsPropertyItem::getPropertyType
- *
+ *
* @return void
*/
public function testGetPropertyType()
diff --git a/test/classes/properties/options/PMA_OptionsPropertyOneItem_test.php b/test/classes/properties/options/PMA_OptionsPropertyOneItem_test.php
index 63d7f07112..142c201197 100644
--- a/test/classes/properties/options/PMA_OptionsPropertyOneItem_test.php
+++ b/test/classes/properties/options/PMA_OptionsPropertyOneItem_test.php
@@ -10,7 +10,7 @@ require_once 'libraries/properties/options/OptionsPropertyOneItem.class.php';
/**
* Tests for OptionsPropertyOneItem class
- *
+ *
* @package PhpMyAdmin-test
*/
class PMA_OptionsPropertyOneItem_Test extends PHPUnit_Framework_TestCase
@@ -29,7 +29,7 @@ class PMA_OptionsPropertyOneItem_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
public function tearDown()
@@ -41,7 +41,7 @@ class PMA_OptionsPropertyOneItem_Test extends PHPUnit_Framework_TestCase
* Test for
* - OptionsPropertyOneItem::getValues
* - OptionsPropertyOneItem::setValues
- *
+ *
* @return void
*/
public function testGetSetValues()
@@ -58,7 +58,7 @@ class PMA_OptionsPropertyOneItem_Test extends PHPUnit_Framework_TestCase
* Test for
* - OptionsPropertyOneItem::getLen
* - OptionsPropertyOneItem::setLen
- *
+ *
* @return void
*/
public function testGetSetLen()
@@ -75,7 +75,7 @@ class PMA_OptionsPropertyOneItem_Test extends PHPUnit_Framework_TestCase
* Test for
* - OptionsPropertyOneItem::getForce
* - OptionsPropertyOneItem::setForce
- *
+ *
* @return void
*/
public function testGetSetForce()
@@ -92,7 +92,7 @@ class PMA_OptionsPropertyOneItem_Test extends PHPUnit_Framework_TestCase
* Test for
* - OptionsPropertyOneItem::getDoc
* - OptionsPropertyOneItem::setDoc
- *
+ *
* @return void
*/
public function testGetSetDoc()
@@ -109,7 +109,7 @@ class PMA_OptionsPropertyOneItem_Test extends PHPUnit_Framework_TestCase
* Test for
* - OptionsPropertyOneItem::getSize
* - OptionsPropertyOneItem::setSize
- *
+ *
* @return void
*/
public function testGetSetSize()
diff --git a/test/classes/properties/options/groups/PMA_OptionsPropertyMainGroup_test.php b/test/classes/properties/options/groups/PMA_OptionsPropertyMainGroup_test.php
index 66569114fc..2d12f8e716 100644
--- a/test/classes/properties/options/groups/PMA_OptionsPropertyMainGroup_test.php
+++ b/test/classes/properties/options/groups/PMA_OptionsPropertyMainGroup_test.php
@@ -28,17 +28,17 @@ class PMA_OptionsPropertyMainGroup_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
protected function tearDown()
{
unset($this->object);
}
-
+
/**
* Test for OptionsPropertyMainGroup::getItemType
- *
+ *
* @return void
*/
public function testGetItemType()
diff --git a/test/classes/properties/options/groups/PMA_OptionsPropertyRootGroup_test.php b/test/classes/properties/options/groups/PMA_OptionsPropertyRootGroup_test.php
index fa76c6f3d5..e688ff4df8 100644
--- a/test/classes/properties/options/groups/PMA_OptionsPropertyRootGroup_test.php
+++ b/test/classes/properties/options/groups/PMA_OptionsPropertyRootGroup_test.php
@@ -28,17 +28,17 @@ class PMA_OptionsPropertyRootGroup_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
protected function tearDown()
{
unset($this->object);
}
-
+
/**
* Test for OptionsPropertyRootGroup::getItemType
- *
+ *
* @return void
*/
public function testGetItemType()
diff --git a/test/classes/properties/options/groups/PMA_OptionsPropertySubgroup_test.php b/test/classes/properties/options/groups/PMA_OptionsPropertySubgroup_test.php
index 7c0b74677b..286671ced5 100644
--- a/test/classes/properties/options/groups/PMA_OptionsPropertySubgroup_test.php
+++ b/test/classes/properties/options/groups/PMA_OptionsPropertySubgroup_test.php
@@ -28,17 +28,17 @@ class PMA_OptionsPropertySubgroup_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
protected function tearDown()
{
unset($this->object);
}
-
+
/**
* Test for OptionsPropertySubgroup::getItemType
- *
+ *
* @return void
*/
public function testGetItemType()
@@ -52,8 +52,8 @@ class PMA_OptionsPropertySubgroup_Test extends PHPUnit_Framework_TestCase
/**
* Test for
* - OptionsPropertySubgroup::getSubgroupHeader
- * - OptionsPropertySubgroup::setSubgroupHeader
- *
+ * - OptionsPropertySubgroup::setSubgroupHeader
+ *
* @return void
*/
public function testGetSetSubgroupHeader()
diff --git a/test/classes/properties/options/items/PMA_PropertyItems_test.php b/test/classes/properties/options/items/PMA_PropertyItems_test.php
index 9ecde7c3ce..04b71e806c 100644
--- a/test/classes/properties/options/items/PMA_PropertyItems_test.php
+++ b/test/classes/properties/options/items/PMA_PropertyItems_test.php
@@ -22,7 +22,7 @@ class PMA_PropertyItems_Test extends PHPUnit_Framework_TestCase
{
/**
* Test for BoolPropertyItem::getItemType
- *
+ *
* @return void
*/
public function testBoolGetItemType()
@@ -37,7 +37,7 @@ class PMA_PropertyItems_Test extends PHPUnit_Framework_TestCase
/**
* Test for DocPropertyItem::getItemType
- *
+ *
* @return void
*/
public function testGetItemTypeDoc()
@@ -52,7 +52,7 @@ class PMA_PropertyItems_Test extends PHPUnit_Framework_TestCase
/**
* Test for HiddenPropertyItem::getItemType
- *
+ *
* @return void
*/
public function testGetItemTypeHidden()
@@ -67,7 +67,7 @@ class PMA_PropertyItems_Test extends PHPUnit_Framework_TestCase
/**
* Test for MessageOnlyPropertyItem::getItemType
- *
+ *
* @return void
*/
public function testGetItemTypeMessageOnly()
@@ -82,7 +82,7 @@ class PMA_PropertyItems_Test extends PHPUnit_Framework_TestCase
/**
* Test for RadioPropertyItem::getItemType
- *
+ *
* @return void
*/
public function testGetItemTypeRadio()
@@ -97,7 +97,7 @@ class PMA_PropertyItems_Test extends PHPUnit_Framework_TestCase
/**
* Test for SelectPropertyItem::getItemType
- *
+ *
* @return void
*/
public function testGetItemTypeSelect()
@@ -112,7 +112,7 @@ class PMA_PropertyItems_Test extends PHPUnit_Framework_TestCase
/**
* Test for TextPropertyItem::getItemType
- *
+ *
* @return void
*/
public function testGetItemTypeText()
diff --git a/test/classes/properties/plugins/PMA_ExportPluginProperties_test.php b/test/classes/properties/plugins/PMA_ExportPluginProperties_test.php
index 892f9ccd31..92ba0a2cd6 100644
--- a/test/classes/properties/plugins/PMA_ExportPluginProperties_test.php
+++ b/test/classes/properties/plugins/PMA_ExportPluginProperties_test.php
@@ -11,9 +11,9 @@ require_once 'libraries/properties/options/groups/OptionsPropertyRootGroup.class
require_once 'test/classes/properties/plugins/PMA_ImportPluginProperties_test.php';
/**
- * Tests for ExportPluginProperties class. Extends PMA_ImportPluginProperties_Tests
+ * Tests for ExportPluginProperties class. Extends PMA_ImportPluginProperties_Tests
* and adds tests for methods that are not common to both
- *
+ *
* @package PhpMyAdmin-test
*/
class PMA_ExportPluginProperties_Test extends PMA_ImportPluginProperties_Test
@@ -32,7 +32,7 @@ class PMA_ExportPluginProperties_Test extends PMA_ImportPluginProperties_Test
/**
* tearDown for test cases
- *
+ *
* @return void
*/
public function tearDown()
@@ -42,7 +42,7 @@ class PMA_ExportPluginProperties_Test extends PMA_ImportPluginProperties_Test
/**
* Test for ExportPluginProperties::getItemType
- *
+ *
* @return void
*/
public function testGetItemType()
@@ -57,7 +57,7 @@ class PMA_ExportPluginProperties_Test extends PMA_ImportPluginProperties_Test
* Test for
* - ExportPluginProperties::getForceFile
* - ExportPluginProperties::setForceFile
- *
+ *
* @return void
*/
public function testSetGetForceFile()
diff --git a/test/classes/properties/plugins/PMA_ImportPluginProperties_test.php b/test/classes/properties/plugins/PMA_ImportPluginProperties_test.php
index 2f957c85aa..602f6b0599 100644
--- a/test/classes/properties/plugins/PMA_ImportPluginProperties_test.php
+++ b/test/classes/properties/plugins/PMA_ImportPluginProperties_test.php
@@ -29,17 +29,17 @@ class PMA_ImportPluginProperties_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
protected function tearDown()
{
unset($this->object);
}
-
+
/**
* Test for ImportPluginProperties::getItemType
- *
+ *
* @return void
*/
public function testGetItemType()
@@ -51,10 +51,10 @@ class PMA_ImportPluginProperties_Test extends PHPUnit_Framework_TestCase
}
/**
- * Test for
+ * Test for
* - ImportPluginProperties::getOptionsText
* - ImportPluginProperties::setOptionsText
- *
+ *
* @return void
*/
public function testSetGetOptionsText()
@@ -68,10 +68,10 @@ class PMA_ImportPluginProperties_Test extends PHPUnit_Framework_TestCase
}
/**
- * Test for
+ * Test for
* - ImportPluginProperties::setMimeType
* - ImportPluginProperties::getMimeType
- *
+ *
* @return void
*/
public function testSetGetMimeType()
diff --git a/test/classes/properties/plugins/PMA_PluginPorpertyItem_test.php b/test/classes/properties/plugins/PMA_PluginPorpertyItem_test.php
index 7b5f209f39..13195f2866 100644
--- a/test/classes/properties/plugins/PMA_PluginPorpertyItem_test.php
+++ b/test/classes/properties/plugins/PMA_PluginPorpertyItem_test.php
@@ -10,7 +10,7 @@ require_once 'libraries/properties/plugins/PluginPropertyItem.class.php';
/**
* Tests for PluginPropertyItem class
- *
+ *
* @package PhpMyAdmin-test
*/
class PMA_PluginPropertyItem_Test extends PHPUnit_Framework_TestCase
@@ -29,7 +29,7 @@ class PMA_PluginPropertyItem_Test extends PHPUnit_Framework_TestCase
/**
* tearDown for test cases
- *
+ *
* @return void
*/
public function tearDown()
@@ -39,7 +39,7 @@ class PMA_PluginPropertyItem_Test extends PHPUnit_Framework_TestCase
/**
* Test for PluginPropertyItem::getPropertyType
- *
+ *
* @return void
*/
public function testGetPropertyType()
diff --git a/test/classes/schema/Dia_Relation_Schema_test.php b/test/classes/schema/Dia_Relation_Schema_test.php
index 43ad2fa37c..6cb086d605 100644
--- a/test/classes/schema/Dia_Relation_Schema_test.php
+++ b/test/classes/schema/Dia_Relation_Schema_test.php
@@ -46,13 +46,13 @@ class PMA_Dia_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$_POST['orientation'] = 'orientation';
$_POST['paper'] = 'paper';
$_POST['export_type'] = 'PMA_ExportType';
-
+
$GLOBALS['server'] = 1;
$GLOBALS['controllink'] = null;
$GLOBALS['db'] = 'information_schema';
$GLOBALS['cfg']['ServerDefault'] = 1;
$GLOBALS['cfg']['Server']['table_coords'] = "table_name";
-
+
//_SESSION
$_SESSION['relation'][$GLOBALS['server']] = array(
'table_coords' => "table_name",
@@ -62,28 +62,28 @@ class PMA_Dia_Relation_Schema_Test extends PHPUnit_Framework_TestCase
'relwork' => 'relwork',
'relation' => 'relation'
);
-
+
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')
->disableOriginalConstructor()
->getMock();
-
+
$dbi->expects($this->any())
->method('numRows')
->will($this->returnValue(1));
-
+
$dbi->expects($this->any())
->method('query')
->will($this->returnValue("executed_1"));
-
+
$dbi->expects($this->any())
->method('tryQuery')
->will($this->returnValue("executed_1"));
-
+
$fetchArrayReturn = array(
//table name in information_schema_relations
'table_name' => 'CHARACTER_SETS'
);
-
+
$fetchArrayReturn2 = array(
//table name in information_schema_relations
'table_name' => 'COLLATIONS'
@@ -98,7 +98,7 @@ class PMA_Dia_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$dbi->expects($this->at(4))
->method('fetchAssoc')
->will($this->returnValue(false));
-
+
$getIndexesResult = array(
array(
'Table' => 'pma_tbl',
@@ -110,7 +110,7 @@ class PMA_Dia_Relation_Schema_Test extends PHPUnit_Framework_TestCase
);
$dbi->expects($this->any())->method('getTableIndexes')
->will($this->returnValue($getIndexesResult));
-
+
$fetchValue = "CREATE TABLE `pma_bookmark` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dbase` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
@@ -118,15 +118,15 @@ class PMA_Dia_Relation_Schema_Test extends PHPUnit_Framework_TestCase
`label` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`query` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 "
+ ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 "
. "COLLATE=utf8_bin COMMENT='Bookmarks'";
-
+
$dbi->expects($this->any())
->method('fetchValue')
- ->will($this->returnValue($fetchValue));
+ ->will($this->returnValue($fetchValue));
$GLOBALS['dbi'] = $dbi;
-
+
$this->object = new PMA_Dia_Relation_Schema();
}
@@ -154,27 +154,27 @@ class PMA_Dia_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$this->assertEquals(
33,
$this->object->pageNumber
- );
+ );
$this->assertEquals(
1,
$this->object->showGrid
- );
+ );
$this->assertEquals(
1,
$this->object->showColor
- );
+ );
$this->assertEquals(
1,
$this->object->showKeys
- );
+ );
$this->assertEquals(
'P',
$this->object->orientation
- );
+ );
$this->assertEquals(
'paper',
$this->object->paper
- );
+ );
$this->assertEquals(
'PMA_ExportType',
$this->object->exportType
diff --git a/test/classes/schema/Eps_Relation_Schema_test.php b/test/classes/schema/Eps_Relation_Schema_test.php
index ea78627987..1fb2c21220 100644
--- a/test/classes/schema/Eps_Relation_Schema_test.php
+++ b/test/classes/schema/Eps_Relation_Schema_test.php
@@ -52,7 +52,7 @@ class PMA_Eps_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$GLOBALS['db'] = 'information_schema';
$GLOBALS['cfg']['ServerDefault'] = 1;
$GLOBALS['cfg']['Server']['table_coords'] = "table_name";
-
+
//_SESSION
$_SESSION['relation'][$GLOBALS['server']] = array(
'table_coords' => "table_name",
@@ -62,28 +62,28 @@ class PMA_Eps_Relation_Schema_Test extends PHPUnit_Framework_TestCase
'relwork' => 'relwork',
'relation' => 'relation'
);
-
+
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')
->disableOriginalConstructor()
->getMock();
-
+
$dbi->expects($this->any())
->method('numRows')
->will($this->returnValue(1));
-
+
$dbi->expects($this->any())
->method('query')
->will($this->returnValue("executed_1"));
-
+
$dbi->expects($this->any())
->method('tryQuery')
->will($this->returnValue("executed_1"));
-
+
$fetchArrayReturn = array(
//table name in information_schema_relations
'table_name' => 'CHARACTER_SETS'
);
-
+
$fetchArrayReturn2 = array(
//table name in information_schema_relations
'table_name' => 'COLLATIONS'
@@ -98,7 +98,7 @@ class PMA_Eps_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$dbi->expects($this->at(4))
->method('fetchAssoc')
->will($this->returnValue(false));
-
+
$getIndexesResult = array(
array(
'Table' => 'pma_tbl',
@@ -110,7 +110,7 @@ class PMA_Eps_Relation_Schema_Test extends PHPUnit_Framework_TestCase
);
$dbi->expects($this->any())->method('getTableIndexes')
->will($this->returnValue($getIndexesResult));
-
+
$fetchValue = "CREATE TABLE `pma_bookmark` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dbase` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
@@ -118,16 +118,16 @@ class PMA_Eps_Relation_Schema_Test extends PHPUnit_Framework_TestCase
`label` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`query` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 "
+ ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 "
. "COLLATE=utf8_bin COMMENT='Bookmarks'";
-
+
$dbi->expects($this->any())
->method('fetchValue')
- ->will($this->returnValue($fetchValue));
+ ->will($this->returnValue($fetchValue));
$GLOBALS['dbi'] = $dbi;
-
- $this->object = new PMA_Eps_Relation_Schema();
+
+ $this->object = new PMA_Eps_Relation_Schema();
}
/**
@@ -150,23 +150,23 @@ class PMA_Eps_Relation_Schema_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testConstructor()
- {
+ {
$this->assertEquals(
33,
$this->object->pageNumber
- );
+ );
$this->assertEquals(
1,
$this->object->showColor
- );
+ );
$this->assertEquals(
1,
$this->object->showKeys
- );
+ );
$this->assertEquals(
1,
$this->object->tableDimension
- );
+ );
$this->assertEquals(
1,
$this->object->sameWide
@@ -174,7 +174,7 @@ class PMA_Eps_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$this->assertEquals(
'L',
$this->object->orientation
- );
+ );
$this->assertEquals(
'PMA_ExportType',
$this->object->exportType
@@ -190,7 +190,7 @@ class PMA_Eps_Relation_Schema_Test extends PHPUnit_Framework_TestCase
*/
public function testSetPageNumbere()
{
- $this->object->setPageNumber(33);
+ $this->object->setPageNumber(33);
$this->assertEquals(
33,
$this->object->pageNumber
diff --git a/test/classes/schema/Pdf_Relation_Schema_test.php b/test/classes/schema/Pdf_Relation_Schema_test.php
index 46499c2bcb..3267587cfe 100644
--- a/test/classes/schema/Pdf_Relation_Schema_test.php
+++ b/test/classes/schema/Pdf_Relation_Schema_test.php
@@ -50,7 +50,7 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$_POST['paper'] = 'paper';
$_POST['export_type'] = 'PMA_ExportType';
$_POST['with_doc'] = 'on';
-
+
$GLOBALS['server'] = 1;
$GLOBALS['controllink'] = null;
$GLOBALS['db'] = 'information_schema';
@@ -62,7 +62,7 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$GLOBALS['cfg']['Server']['bookmarktable'] = "bookmarktable";
$GLOBALS['cfg']['Server']['relation'] = "relation";
$GLOBALS['cfg']['Server']['table_info'] = "table_info";
-
+
//_SESSION
$_SESSION['relation'][$GLOBALS['server']] = array(
'table_coords' => "table_name",
@@ -75,28 +75,28 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
'commwork' => 'commwork',
'column_info' => 'column_info'
);
-
+
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')
->disableOriginalConstructor()
->getMock();
-
+
$dbi->expects($this->any())
->method('numRows')
->will($this->returnValue(1));
-
+
$dbi->expects($this->any())
->method('query')
->will($this->returnValue("executed_1"));
-
+
$dbi->expects($this->any())
->method('tryQuery')
->will($this->returnValue("executed_1"));
-
+
$fetchArrayReturn = array(
//table name in information_schema_relations
'table_name' => 'CHARACTER_SETS'
);
-
+
$fetchArrayReturn2 = array(
//table name in information_schema_relations
'table_name' => 'COLLATIONS'
@@ -111,7 +111,7 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$dbi->expects($this->at(4))
->method('fetchAssoc')
->will($this->returnValue(false));
-
+
$fetchRowReturn = array(
'table_name'
);
@@ -122,7 +122,7 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
->method('fetchRow')
->will($this->returnValue($fetchRowReturn));
}
-
+
$dbi->expects($this->at(10))
->method('fetchRow')
->will($this->returnValue($fetchRowReturn));
@@ -137,10 +137,10 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
);
$dbi->expects($this->any())->method('getColumns')
->will($this->returnValue($fields_info));
-
+
$dbi->expects($this->any())->method('selectDb')
->will($this->returnValue(true));
-
+
$getIndexesResult = array(
array(
'Table' => 'pma_tbl',
@@ -152,7 +152,7 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
);
$dbi->expects($this->any())->method('getTableIndexes')
->will($this->returnValue($getIndexesResult));
-
+
$fetchValue = "CREATE TABLE `pma_bookmark` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dbase` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
@@ -160,25 +160,25 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
`label` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`query` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 "
+ ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 "
. "COLLATE=utf8_bin COMMENT='Bookmarks'";
-
+
$dbi->expects($this->any())
->method('fetchValue')
- ->will($this->returnValue($fetchValue));
+ ->will($this->returnValue($fetchValue));
$fetchResult = array(
'column1' => array('mimetype' => 'value1', 'transformation'=> 'pdf'),
'column2' => array('mimetype' => 'value2', 'transformation'=> 'xml'),
);
-
+
$dbi->expects($this->any())->method('fetchResult')
->will($this->returnValue($fetchResult));
-
+
$GLOBALS['dbi'] = $dbi;
-
- $this->object = new PMA_Pdf_Relation_Schema();
+
+ $this->object = new PMA_Pdf_Relation_Schema();
}
/**
@@ -201,31 +201,31 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testConstructor()
- {
+ {
$this->assertEquals(
33,
$this->object->pageNumber
- );
+ );
$this->assertEquals(
1,
$this->object->showGrid
- );
+ );
$this->assertEquals(
1,
$this->object->showColor
- );
+ );
$this->assertEquals(
1,
$this->object->showKeys
- );
+ );
$this->assertEquals(
1,
$this->object->tableDimension
- );
+ );
$this->assertEquals(
1,
$this->object->sameWide
- );
+ );
$this->assertEquals(
1,
$this->object->withDoc
@@ -233,14 +233,14 @@ class PMA_Pdf_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$this->assertEquals(
'L',
$this->object->orientation
- );
+ );
$this->assertEquals(
'PMA_ExportType',
$this->object->exportType
- );
+ );
$this->assertEquals(
'paper',
$this->object->paper
- );
+ );
}
}
diff --git a/test/classes/schema/Svg_Relation_Schema_test.php b/test/classes/schema/Svg_Relation_Schema_test.php
index 2640bafa88..fe916c8ad0 100644
--- a/test/classes/schema/Svg_Relation_Schema_test.php
+++ b/test/classes/schema/Svg_Relation_Schema_test.php
@@ -53,7 +53,7 @@ class PMA_Svg_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$GLOBALS['db'] = 'information_schema';
$GLOBALS['cfg']['ServerDefault'] = 1;
$GLOBALS['cfg']['Server']['table_coords'] = "table_name";
-
+
//_SESSION
$_SESSION['relation'][$GLOBALS['server']] = array(
'table_coords' => "table_name",
@@ -63,28 +63,28 @@ class PMA_Svg_Relation_Schema_Test extends PHPUnit_Framework_TestCase
'relwork' => 'relwork',
'relation' => 'relation'
);
-
+
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')
->disableOriginalConstructor()
->getMock();
-
+
$dbi->expects($this->any())
->method('numRows')
->will($this->returnValue(1));
-
+
$dbi->expects($this->any())
->method('query')
->will($this->returnValue("executed_1"));
-
+
$dbi->expects($this->any())
->method('tryQuery')
->will($this->returnValue("executed_1"));
-
+
$fetchArrayReturn = array(
//table name in information_schema_relations
'table_name' => 'CHARACTER_SETS'
);
-
+
$fetchArrayReturn2 = array(
//table name in information_schema_relations
'table_name' => 'COLLATIONS'
@@ -99,7 +99,7 @@ class PMA_Svg_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$dbi->expects($this->at(4))
->method('fetchAssoc')
->will($this->returnValue(false));
-
+
$getIndexesResult = array(
array(
'Table' => 'pma_tbl',
@@ -111,7 +111,7 @@ class PMA_Svg_Relation_Schema_Test extends PHPUnit_Framework_TestCase
);
$dbi->expects($this->any())->method('getTableIndexes')
->will($this->returnValue($getIndexesResult));
-
+
$fetchValue = "CREATE TABLE `pma_bookmark` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dbase` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
@@ -119,16 +119,16 @@ class PMA_Svg_Relation_Schema_Test extends PHPUnit_Framework_TestCase
`label` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`query` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 "
+ ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 "
. "COLLATE=utf8_bin COMMENT='Bookmarks'";
-
+
$dbi->expects($this->any())
->method('fetchValue')
- ->will($this->returnValue($fetchValue));
+ ->will($this->returnValue($fetchValue));
$GLOBALS['dbi'] = $dbi;
-
- $this->object = new PMA_Svg_Relation_Schema();
+
+ $this->object = new PMA_Svg_Relation_Schema();
}
/**
@@ -151,23 +151,23 @@ class PMA_Svg_Relation_Schema_Test extends PHPUnit_Framework_TestCase
* @group medium
*/
public function testConstructor()
- {
+ {
$this->assertEquals(
33,
$this->object->pageNumber
- );
+ );
$this->assertEquals(
1,
$this->object->showColor
- );
+ );
$this->assertEquals(
1,
$this->object->showKeys
- );
+ );
$this->assertEquals(
1,
$this->object->tableDimension
- );
+ );
$this->assertEquals(
1,
$this->object->sameWide
@@ -175,6 +175,6 @@ class PMA_Svg_Relation_Schema_Test extends PHPUnit_Framework_TestCase
$this->assertEquals(
'PMA_ExportType',
$this->object->exportType
- );
+ );
}
}
diff --git a/test/classes/schema/Svg_test.php b/test/classes/schema/Svg_test.php
index c752a4a99e..5f4014130e 100644
--- a/test/classes/schema/Svg_test.php
+++ b/test/classes/schema/Svg_test.php
@@ -31,7 +31,7 @@ class PMA_Svg_Test extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
- $this->object = new PMA_SVG();
+ $this->object = new PMA_SVG();
}
/**
@@ -76,7 +76,7 @@ class PMA_Svg_Test extends PHPUnit_Framework_TestCase
12,
$this->object->getStringWidth("aa", "arial", "10")
);
-
+
// string "i"
$this->assertEquals(
3,
diff --git a/test/classes/schema/User_Schema_test.php b/test/classes/schema/User_Schema_test.php
index 2c23bbb3db..df13967293 100644
--- a/test/classes/schema/User_Schema_test.php
+++ b/test/classes/schema/User_Schema_test.php
@@ -55,14 +55,14 @@ class PMA_User_Schema_Test extends PHPUnit_Framework_TestCase
$GLOBALS['cfgRelation']['table_coords'] = "table_name";
$GLOBALS['cfgRelation']['pdf_pages'] = "pdf_pages";
$GLOBALS['cfgRelation']['relation'] = "relation";
-
+
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')
->disableOriginalConstructor()
->getMock();
-
+
$dbi->expects($this->any())
->method('insertId')
- ->will($this->returnValue(10));
+ ->will($this->returnValue(10));
$databases = array();
$database_name = 'PMA';
@@ -73,13 +73,13 @@ class PMA_User_Schema_Test extends PHPUnit_Framework_TestCase
$databases[$database_name]['SCHEMA_INDEX_LENGTH'] = 10;
$databases[$database_name]['SCHEMA_LENGTH'] = 10;
$databases[$database_name]['ENGINE'] = "InnerDB";
-
+
$dbi->expects($this->any())->method('getTablesFull')
- ->will($this->returnValue($databases));
+ ->will($this->returnValue($databases));
$GLOBALS['dbi'] = $dbi;
-
- $this->object = new PMA_User_Schema();
+
+ $this->object = new PMA_User_Schema();
}
/**
@@ -106,48 +106,48 @@ class PMA_User_Schema_Test extends PHPUnit_Framework_TestCase
//action: selectpage
$_REQUEST['chpage'] = 10;
$_REQUEST['action_choose'] = '2';
- $this->object->setAction("selectpage");
- $this->object->processUserChoice();
+ $this->object->setAction("selectpage");
+ $this->object->processUserChoice();
$this->assertEquals(
"selectpage",
$this->object->action
- );
+ );
$this->assertEquals(
10,
$this->object->chosenPage
);
-
+
$_REQUEST['action_choose'] = '1';
- $this->object->processUserChoice();
+ $this->object->processUserChoice();
//deleteCoordinates successfully
$this->assertEquals(
0,
$this->object->chosenPage
);
-
+
//action: createpage
$_POST['newpage'] = "3";
$_POST['auto_layout_foreign'] = true;
$_POST['auto_layout_internal'] = true;
$_POST['delrow'] = array("row1", "row2");
$_POST['chpage'] = "chpage";
- $this->object->setAction("delete_old_references");
- $this->object->processUserChoice();
- $this->object->setAction("createpage");
- $this->object->processUserChoice();
+ $this->object->setAction("delete_old_references");
+ $this->object->processUserChoice();
+ $this->object->setAction("createpage");
+ $this->object->processUserChoice();
$this->assertEquals(
10,
$this->object->pageNumber
- );
+ );
$this->assertEquals(
"1",
$this->object->autoLayoutForeign
- );
+ );
$this->assertEquals(
"1",
$this->object->autoLayoutInternal
);
-
+
//action: edcoord
$_POST['chpage'] = "3";
$_POST['c_table_rows'] = 1;
@@ -158,15 +158,15 @@ class PMA_User_Schema_Test extends PHPUnit_Framework_TestCase
'delete' => 'delete0',
'x' => 'x0',
);
- $this->object->setAction("edcoord");
- $this->object->processUserChoice();
+ $this->object->setAction("edcoord");
+ $this->object->processUserChoice();
$this->assertEquals(
'3',
$this->object->chosenPage
- );
+ );
$this->assertEquals(
1,
$this->object->c_table_rows
- );
+ );
}
}
From 0c887a5a55f0fb117ff676064fc6aaf07f01b028 Mon Sep 17 00:00:00 2001
From: Madhura Jayaratne