Merge remote branch 'upstream/master'
This commit is contained in:
commit
384f446a17
20
po/cs.po
20
po/cs.po
@ -6,7 +6,7 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-03 09:19+0200\n"
|
||||
"PO-Revision-Date: 2012-06-26 16:48+0200\n"
|
||||
"PO-Revision-Date: 2012-07-09 15:14+0200\n"
|
||||
"Last-Translator: Michal Čihař <michal@cihar.com>\n"
|
||||
"Language-Team: czech <cs@li.org>\n"
|
||||
"Language: cs\n"
|
||||
@ -14,7 +14,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
||||
"X-Generator: Weblate 1.0\n"
|
||||
"X-Generator: Weblate 1.1\n"
|
||||
|
||||
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
|
||||
#: libraries/DisplayResults.class.php:609 server_privileges.php:1851
|
||||
@ -7888,7 +7888,6 @@ msgstr ""
|
||||
"musí být prázdný."
|
||||
|
||||
#: libraries/plugins/transformations/abstract/ExternalTransformationsPlugin.class.php:31
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "LINUX ONLY: Launches an external application and feeds it the column data "
|
||||
#| "via standard input. Returns the standard output of the application. The "
|
||||
@ -7915,13 +7914,14 @@ msgstr ""
|
||||
"JEN PRO LINUX: Spustí externí program, na jeho standardní vstup pošle obsah "
|
||||
"pole a zobrazí výstup programu. Výchozí je program Tidy, který pěkně "
|
||||
"zformátuje HTML. Z bezpečnostních důvodů musíte jména povolených programů "
|
||||
"zapsat do souboru libraries/transformations/text_plain__external.inc.php. "
|
||||
"První parametr je číslo programu, který má být spuštěn a druhý parametr "
|
||||
"udává parametry tohoto programu. Třetí parametr určuje, zda mají být ve "
|
||||
"výstupu nahrazeny HTML entity (např. pro zobrazení zdrojového kódu HTML) "
|
||||
"(výchozí je 1, tedy převádět na entity), čtvrtý (při nastavení na 1) zajistí "
|
||||
"přidání parametru NOWRAP k vypisovanému textu, čímž se zachová formátování "
|
||||
"(výchozí je 1)."
|
||||
"zapsat do souboru "
|
||||
"libraries/plugins/transformations/Text_Plain_External.class.php. První "
|
||||
"parametr je číslo programu, který má být spuštěn a druhý parametr udává "
|
||||
"parametry tohoto programu. Třetí parametr určuje, zda mají být ve výstupu "
|
||||
"nahrazeny HTML entity (např. pro zobrazení zdrojového kódu HTML) (výchozí je "
|
||||
"1, tedy převádět na entity), čtvrtý (při nastavení na 1) zajistí přidání "
|
||||
"parametru NOWRAP k vypisovanému textu, čímž se zachová formátování (výchozí "
|
||||
"je 1)."
|
||||
|
||||
#: libraries/plugins/transformations/abstract/FormattedTransformationsPlugin.class.php:31
|
||||
msgid ""
|
||||
|
||||
13
po/es.po
13
po/es.po
@ -4,7 +4,7 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-03 09:19+0200\n"
|
||||
"PO-Revision-Date: 2012-06-26 20:02+0200\n"
|
||||
"PO-Revision-Date: 2012-07-09 17:51+0200\n"
|
||||
"Last-Translator: Matías Bellone <matiasbellone@gmail.com>\n"
|
||||
"Language-Team: spanish <es@li.org>\n"
|
||||
"Language: es\n"
|
||||
@ -12,7 +12,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Weblate 1.0\n"
|
||||
"X-Generator: Weblate 1.1\n"
|
||||
|
||||
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
|
||||
#: libraries/DisplayResults.class.php:609 server_privileges.php:1851
|
||||
@ -8066,7 +8066,6 @@ msgstr ""
|
||||
"usa esta última, la primer opción tiene que ser una cadena vacía."
|
||||
|
||||
#: libraries/plugins/transformations/abstract/ExternalTransformationsPlugin.class.php:31
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "LINUX ONLY: Launches an external application and feeds it the column data "
|
||||
#| "via standard input. Returns the standard output of the application. The "
|
||||
@ -8094,10 +8093,10 @@ msgstr ""
|
||||
"columna mediante entrada estándar. Devuelve la salidad de la aplicación. El "
|
||||
"valor predeterminado es Tidy para mostrar código HTML agradable para la "
|
||||
"impresión. Por razones de seguridad, debe editar manualmente el archivo "
|
||||
"libraries/transformations/text_plain__external.inc.php y agregar las "
|
||||
"herramientas que permitirá ejecutar. La primera opción será el número del "
|
||||
"programa que querrá utilizar y la segunda opción son los parámetros para el "
|
||||
"programa. Si el tercer parámetro es 1 (el valor predeterminado), se "
|
||||
"libraries/plugins/transformations/Text_Plain_External.class.php y agregar "
|
||||
"las herramientas que permitirá ejecutar. La primera opción será el número "
|
||||
"del programa que querrá utilizar y la segunda opción los parámetros para "
|
||||
"dicho programa. Si el tercer parámetro es 1 (el valor predeterminado), se "
|
||||
"convertirá la salida utilizando htmlspecialchars(). La cuarta opción, de ser "
|
||||
"1 (el valor predeterminado), evitará separar la salida en varias líneas "
|
||||
"asegurando que aparezca completa en una sola línea."
|
||||
|
||||
65
po/nb.po
65
po/nb.po
@ -4,7 +4,7 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-03 09:19+0200\n"
|
||||
"PO-Revision-Date: 2012-07-09 03:26+0200\n"
|
||||
"PO-Revision-Date: 2012-07-09 16:04+0200\n"
|
||||
"Last-Translator: Nicholas Arnesen <baretester@live.no>\n"
|
||||
"Language-Team: norwegian <no@li.org>\n"
|
||||
"Language: nb\n"
|
||||
@ -1922,7 +1922,7 @@ msgstr ""
|
||||
|
||||
#: js/messages.php:308
|
||||
msgid "Click a data point to view and possibly edit the data row."
|
||||
msgstr ""
|
||||
msgstr "Velg et datapunkt for å vise, og muligens endre raden med data."
|
||||
|
||||
#: js/messages.php:310
|
||||
msgid "The plot can be resized by dragging it along the bottom right corner."
|
||||
@ -2514,7 +2514,6 @@ msgid "Inline edit of this query"
|
||||
msgstr "Inline redigering av denne spørringa"
|
||||
|
||||
#: libraries/CommonFunctions.class.php:1405
|
||||
#, fuzzy
|
||||
msgctxt "Inline edit query"
|
||||
msgid "Inline"
|
||||
msgstr "Innebygd"
|
||||
@ -2541,15 +2540,13 @@ msgid "%s days, %s hours, %s minutes and %s seconds"
|
||||
msgstr "%s dager, %s timer, %s minutter og %s sekunder"
|
||||
|
||||
#: libraries/CommonFunctions.class.php:2204
|
||||
#, fuzzy
|
||||
#| msgid "Routines"
|
||||
msgid "Missing parameter:"
|
||||
msgstr "Rutiner"
|
||||
msgstr "Mangler parametere:"
|
||||
|
||||
#: libraries/CommonFunctions.class.php:2624
|
||||
#: libraries/CommonFunctions.class.php:2628
|
||||
#: libraries/DisplayResults.class.php:578
|
||||
#, fuzzy
|
||||
#| msgid "Begin"
|
||||
msgctxt "First page"
|
||||
msgid "Begin"
|
||||
@ -2559,7 +2556,6 @@ msgstr "Start"
|
||||
#: libraries/CommonFunctions.class.php:2629
|
||||
#: libraries/DisplayResults.class.php:581 server_binlog.php:140
|
||||
#: server_binlog.php:142
|
||||
#, fuzzy
|
||||
#| msgid "Previous"
|
||||
msgctxt "Previous page"
|
||||
msgid "Previous"
|
||||
@ -2569,7 +2565,6 @@ msgstr "Forrige"
|
||||
#: libraries/CommonFunctions.class.php:2664
|
||||
#: libraries/DisplayResults.class.php:637 server_binlog.php:175
|
||||
#: server_binlog.php:177
|
||||
#, fuzzy
|
||||
#| msgid "Next"
|
||||
msgctxt "Next page"
|
||||
msgid "Next"
|
||||
@ -2578,11 +2573,10 @@ msgstr "Neste"
|
||||
#: libraries/CommonFunctions.class.php:2662
|
||||
#: libraries/CommonFunctions.class.php:2665
|
||||
#: libraries/DisplayResults.class.php:662
|
||||
#, fuzzy
|
||||
#| msgid "End"
|
||||
msgctxt "Last page"
|
||||
msgid "End"
|
||||
msgstr "Slutt"
|
||||
msgstr "Siste"
|
||||
|
||||
#: libraries/CommonFunctions.class.php:2741
|
||||
#, php-format
|
||||
@ -2595,10 +2589,9 @@ msgid "The %s functionality is affected by a known bug, see %s"
|
||||
msgstr "Funksjonaliteten %s er påvirket av en kjent feil, se %s"
|
||||
|
||||
#: libraries/CommonFunctions.class.php:2950
|
||||
#, fuzzy
|
||||
#| msgid "Click to select"
|
||||
msgid "Click to toggle"
|
||||
msgstr "Klikk for å velge"
|
||||
msgstr "Klikk for å endre"
|
||||
|
||||
#: libraries/CommonFunctions.class.php:3381
|
||||
#: libraries/CommonFunctions.class.php:3388
|
||||
@ -2666,7 +2659,7 @@ msgstr "Det er ingen filer å laste opp"
|
||||
#: libraries/CommonFunctions.class.php:3602
|
||||
#: libraries/CommonFunctions.class.php:3603
|
||||
msgid "Execute"
|
||||
msgstr ""
|
||||
msgstr "Utfør"
|
||||
|
||||
#: libraries/CommonFunctions.class.php:4146
|
||||
msgid "Print"
|
||||
@ -3694,6 +3687,8 @@ msgid ""
|
||||
"This usually means there is a syntax error in it, please check any errors "
|
||||
"shown below."
|
||||
msgstr ""
|
||||
"Dette mener vanligvis at det er en syntaksfeil i det, sjekk mulige feil som "
|
||||
"vises under."
|
||||
|
||||
#: libraries/common.inc.php:581
|
||||
#, php-format
|
||||
@ -3750,15 +3745,15 @@ msgstr "Begge"
|
||||
|
||||
#: libraries/config.values.php:57
|
||||
msgid "Nowhere"
|
||||
msgstr ""
|
||||
msgstr "Ingensteds"
|
||||
|
||||
#: libraries/config.values.php:58
|
||||
msgid "Left"
|
||||
msgstr ""
|
||||
msgstr "Venstre"
|
||||
|
||||
#: libraries/config.values.php:59
|
||||
msgid "Right"
|
||||
msgstr ""
|
||||
msgstr "Høyre"
|
||||
|
||||
#: libraries/config.values.php:98
|
||||
msgid "Open"
|
||||
@ -3973,9 +3968,8 @@ msgstr ""
|
||||
"autentisering"
|
||||
|
||||
#: libraries/config/messages.inc.php:25
|
||||
#, fuzzy
|
||||
msgid "Blowfish secret"
|
||||
msgstr "Blowfish hemmelighet"
|
||||
msgstr "Blowfish hemmelig kode"
|
||||
|
||||
#: libraries/config/messages.inc.php:26
|
||||
msgid "Highlight selected rows"
|
||||
@ -4034,24 +4028,26 @@ msgid ""
|
||||
"Defines the minimum size for input fields generated for CHAR and VARCHAR "
|
||||
"columns"
|
||||
msgstr ""
|
||||
"Definerer minimum størrelse for innskrivningfelt laget for CHAR og VARCHAR "
|
||||
"kolonner"
|
||||
|
||||
#: libraries/config/messages.inc.php:37
|
||||
#, fuzzy
|
||||
#| msgid "Customize export options"
|
||||
msgid "Minimum size for input field"
|
||||
msgstr "Endre eksportstandarder"
|
||||
msgstr "Minste størrelse for innskrivningsfelt"
|
||||
|
||||
#: libraries/config/messages.inc.php:38
|
||||
msgid ""
|
||||
"Defines the maximum size for input fields generated for CHAR and VARCHAR "
|
||||
"columns"
|
||||
msgstr ""
|
||||
"Definerer maks størrelse for innskrivningsfelt laget for CHAR og VARCHAR "
|
||||
"kolonner"
|
||||
|
||||
#: libraries/config/messages.inc.php:39
|
||||
#, fuzzy
|
||||
#| msgid "Maximum size for temporary sort files"
|
||||
msgid "Maximum size for input field"
|
||||
msgstr "Maksimum størrelse for midlertidige sorteringsfiler"
|
||||
msgstr "Maksimum størrelse for innskrivningsfelt"
|
||||
|
||||
#: libraries/config/messages.inc.php:40
|
||||
msgid "Number of columns for CHAR/VARCHAR textareas"
|
||||
@ -4171,10 +4167,9 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: libraries/config/messages.inc.php:67
|
||||
#, fuzzy
|
||||
#| msgid "Table maintenance"
|
||||
msgid "Disable multi table maintenance"
|
||||
msgstr "Tabellvedlikehold"
|
||||
msgstr "Deaktiver multitabellvedlikehold"
|
||||
|
||||
#: libraries/config/messages.inc.php:68
|
||||
msgid "Edit SQL queries in popup window"
|
||||
@ -4366,7 +4361,7 @@ msgstr "SQL kompatibilitetsmodus"
|
||||
#: libraries/config/messages.inc.php:126
|
||||
#: libraries/plugins/export/ExportSql.class.php:332
|
||||
msgid "<code>CREATE TABLE</code> options:"
|
||||
msgstr ""
|
||||
msgstr "<code>OPPRETT TABELL</code> valg:"
|
||||
|
||||
#: libraries/config/messages.inc.php:127
|
||||
msgid "Creation/Update/Check dates"
|
||||
@ -4706,6 +4701,11 @@ msgid ""
|
||||
"strong].[br][em][a@http://sqlvalidator.mimer.com/]Mimer SQL Validator[/a], "
|
||||
"Copyright 2002 Upright Database Technology. All rights reserved.[/em]"
|
||||
msgstr ""
|
||||
"Om du ønsker å bruke SQL-vurderingsservicen så må du være klar over at "
|
||||
"[strong] alle SQL-spørringer blir lagret anonymt for statistisk "
|
||||
"bruk[/strong].[br][em][a@http://sqlvalidator.mimer.com/]Mimer SQL-"
|
||||
"vurderer(engelsk)[/a], Kopirettigheter 2002 Upright Database Technology. "
|
||||
"Alle rettigheter reservert.[/em]"
|
||||
|
||||
#: libraries/config/messages.inc.php:226
|
||||
msgid "Startup"
|
||||
@ -4848,7 +4848,6 @@ msgid "Do not import empty rows"
|
||||
msgstr "Ikke importer tomme rader"
|
||||
|
||||
#: libraries/config/messages.inc.php:264
|
||||
#, fuzzy
|
||||
#| msgid "Import currencies ($5.00 to 5.00)"
|
||||
msgid "Import currencies ($5.00 to 5.00)"
|
||||
msgstr "Importer valuta ($5.00 til 5.00)"
|
||||
@ -4866,7 +4865,6 @@ msgid "Partial import: skip queries"
|
||||
msgstr "Delvis import: hopp over spørringer"
|
||||
|
||||
#: libraries/config/messages.inc.php:269
|
||||
#, fuzzy
|
||||
#| msgid "Do not use AUTO_INCREMENT for zero values"
|
||||
msgid "Do not use AUTO_INCREMENT for zero values"
|
||||
msgstr "Ikke bruk AUTO_INCREMENT for nullverdier"
|
||||
@ -4988,10 +4986,9 @@ msgid "Maximum number of recently used tables; set 0 to disable"
|
||||
msgstr "Maks antall tabeller vist i tabellista"
|
||||
|
||||
#: libraries/config/messages.inc.php:298
|
||||
#, fuzzy
|
||||
#| msgid "Untracked tables"
|
||||
msgid "Recently used tables"
|
||||
msgstr "Ikke overvåkede tabeller"
|
||||
msgstr "Sist brukte tabeller"
|
||||
|
||||
#: libraries/config/messages.inc.php:299
|
||||
#, fuzzy
|
||||
@ -5130,14 +5127,13 @@ msgid "Memory limit"
|
||||
msgstr "Minnetak"
|
||||
|
||||
#: libraries/config/messages.inc.php:325
|
||||
#, fuzzy
|
||||
#| msgid "These are Edit, Inline edit, Copy and Delete links"
|
||||
msgid "These are Edit, Copy and Delete links"
|
||||
msgstr "Dette er rediger, innsmettet rediger, kopier og slettede lenker"
|
||||
msgstr "Disse er Rediger-, kopi- og slettelenker"
|
||||
|
||||
#: libraries/config/messages.inc.php:326
|
||||
msgid "Where to show the table row links"
|
||||
msgstr ""
|
||||
msgstr "Hvor tabell-lenkene skal vises"
|
||||
|
||||
#: libraries/config/messages.inc.php:327
|
||||
msgid "Use natural order for sorting table and database names"
|
||||
@ -5192,7 +5188,7 @@ msgstr ""
|
||||
|
||||
#: libraries/config/messages.inc.php:338
|
||||
msgid "Missing phpMyAdmin configuration storage tables"
|
||||
msgstr ""
|
||||
msgstr "Mangler phpMyAdmin konfigurasjonslagertabeller"
|
||||
|
||||
#: libraries/config/messages.inc.php:340
|
||||
msgid "Iconic table operations"
|
||||
@ -5207,7 +5203,6 @@ msgid "Protect binary columns"
|
||||
msgstr "Beskytt binære kolonner"
|
||||
|
||||
#: libraries/config/messages.inc.php:343
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| " if you want DB-based query history (requires pmadb). If disabled, s "
|
||||
#| "lizes JS-routines to display query history (lost by window close)."
|
||||
@ -5241,7 +5236,7 @@ msgstr "Standard spørringsvindufane"
|
||||
|
||||
#: libraries/config/messages.inc.php:350
|
||||
msgid "Query window height (in pixels)"
|
||||
msgstr ""
|
||||
msgstr "Spørringsvinduets høyde (i piksler)"
|
||||
|
||||
#: libraries/config/messages.inc.php:351
|
||||
msgid "Query window height"
|
||||
|
||||
16
po/pt_BR.po
16
po/pt_BR.po
@ -4,8 +4,8 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-03 09:19+0200\n"
|
||||
"PO-Revision-Date: 2012-07-08 20:32+0200\n"
|
||||
"Last-Translator: Keven do Nascimento Carneiro <kevennascimento@ovi.com>\n"
|
||||
"PO-Revision-Date: 2012-07-10 05:08+0200\n"
|
||||
"Last-Translator: Anderson Diego Kulpa Fachini <anderson.dkfachini@gmail.com>\n"
|
||||
"Language-Team: brazilian_portuguese <pt_BR@li.org>\n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -6764,7 +6764,7 @@ msgstr ""
|
||||
|
||||
#: libraries/engines/pbxt.lib.php:28
|
||||
msgid "Index cache size"
|
||||
msgstr ""
|
||||
msgstr "Tamanho de cache de índice"
|
||||
|
||||
#: libraries/engines/pbxt.lib.php:29
|
||||
msgid ""
|
||||
@ -6774,7 +6774,7 @@ msgstr ""
|
||||
|
||||
#: libraries/engines/pbxt.lib.php:33
|
||||
msgid "Record cache size"
|
||||
msgstr ""
|
||||
msgstr "Tamanho de cache de gravação"
|
||||
|
||||
#: libraries/engines/pbxt.lib.php:34
|
||||
msgid ""
|
||||
@ -6782,6 +6782,10 @@ msgid ""
|
||||
"table data. The default value is 32MB. This memory is used to cache changes "
|
||||
"to the handle data (.xtd) and row pointer (.xtr) files."
|
||||
msgstr ""
|
||||
"Esta é a quantidade de memória alocada para o cache de gravação usado no "
|
||||
"cache de dados de tabela. O valor padrão é 32MB. Esta memória será usada "
|
||||
"para fazer cache de alterações para a manipulação de dados (.xtd) e arquivos "
|
||||
"apontadores de linha (.xtr)."
|
||||
|
||||
#: libraries/engines/pbxt.lib.php:38
|
||||
msgid "Log cache size"
|
||||
@ -6792,10 +6796,12 @@ msgid ""
|
||||
"The amount of memory allocated to the transaction log cache used to cache on "
|
||||
"transaction log data. The default is 16MB."
|
||||
msgstr ""
|
||||
"Quantidade de memória alocada para o cache de log de transação usada para "
|
||||
"manter cache no log da transação de dados. O valor padrão é 16MB."
|
||||
|
||||
#: libraries/engines/pbxt.lib.php:43
|
||||
msgid "Log file threshold"
|
||||
msgstr ""
|
||||
msgstr "Limite de arquivo de log"
|
||||
|
||||
#: libraries/engines/pbxt.lib.php:44
|
||||
msgid ""
|
||||
|
||||
@ -14,7 +14,11 @@ require_once 'libraries/php-gettext/gettext.inc';
|
||||
require_once 'libraries/CommonFunctions.class.php';
|
||||
require_once 'libraries/js_escape.lib.php';
|
||||
|
||||
|
||||
/**
|
||||
* Test cases for displaying results.
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
@ -31,7 +35,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = $this->getMockForAbstractClass('PMA_DisplayResults', array('as', '','',''));
|
||||
$this->object = $this->getMockForAbstractClass(
|
||||
'PMA_DisplayResults',
|
||||
array('as', '','','')
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@ -64,19 +71,21 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $the_disp_mode string the synthetic value for display_mode (see a few lines above for explanations)
|
||||
* @param $the_total the total number of rows returned by the SQL
|
||||
* query without any programmatically appended
|
||||
* LIMIT clause
|
||||
* (just a copy of $unlim_num_rows if it exists,
|
||||
* elsecomputed inside this function)
|
||||
* Test for setting display mode
|
||||
*
|
||||
* @param $output output from the _setDisplayMode method
|
||||
* @param string $the_disp_mode the synthetic value for display_mode (see a
|
||||
* few lines above for explanations)
|
||||
* @param integer $the_total the total number of rows returned by the SQL
|
||||
* query without any programmatically appended
|
||||
* LIMIT clause
|
||||
* (just a copy of $unlim_num_rows if it exists,
|
||||
* elsecomputed inside this function)
|
||||
* @param string $output output from the _setDisplayMode method
|
||||
*
|
||||
* @dataProvider providerForTestSetDisplayModeCase1
|
||||
*/
|
||||
public function testSetDisplayModeCase1($the_disp_mode, $the_total, $output){
|
||||
|
||||
public function testSetDisplayModeCase1($the_disp_mode, $the_total, $output)
|
||||
{
|
||||
$GLOBALS['is_count'] = true;
|
||||
$GLOBALS['is_maint'] = true;
|
||||
|
||||
@ -86,7 +95,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
array(&$the_disp_mode, &$the_total)
|
||||
),
|
||||
$output
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -127,18 +136,21 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $the_disp_mode string the synthetic value for display_mode (see a few lines above for explanations)
|
||||
* @param $the_total the total number of rows returned by the SQL
|
||||
* query without any programmatically appended
|
||||
* LIMIT clause
|
||||
* (just a copy of $unlim_num_rows if it exists,
|
||||
* elsecomputed inside this function)
|
||||
* Test for setting display mode
|
||||
*
|
||||
* @param $output output from the _setDisplayMode method
|
||||
* @param string $the_disp_mode the synthetic value for display_mode (see a
|
||||
* few lines above for explanations)
|
||||
* @param integer $the_total the total number of rows returned by the SQL
|
||||
* query without any programmatically appended
|
||||
* LIMIT clause
|
||||
* (just a copy of $unlim_num_rows if it exists,
|
||||
* elsecomputed inside this function)
|
||||
* @param string $output output from the _setDisplayMode method
|
||||
*
|
||||
* @dataProvider providerForTestSetDisplayModeCase2
|
||||
*/
|
||||
public function testSetDisplayModeCase2($the_disp_mode, $the_total, $output){
|
||||
public function testSetDisplayModeCase2($the_disp_mode, $the_total, $output)
|
||||
{
|
||||
|
||||
|
||||
$GLOBALS['is_count'] = false;
|
||||
@ -196,18 +208,21 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $the_disp_mode string the synthetic value for display_mode (see a few lines above for explanations)
|
||||
* @param $the_total the total number of rows returned by the SQL
|
||||
* query without any programmatically appended
|
||||
* LIMIT clause
|
||||
* (just a copy of $unlim_num_rows if it exists,
|
||||
* elsecomputed inside this function)
|
||||
* Test for setting display mode
|
||||
*
|
||||
* @param $output output from the _setDisplayMode method
|
||||
* @param string $the_disp_mode the synthetic value for display_mode (see a
|
||||
* few lines above for explanations)
|
||||
* @param integer $the_total the total number of rows returned by the SQL
|
||||
* query without any programmatically appended
|
||||
* LIMIT clause
|
||||
* (just a copy of $unlim_num_rows if it exists,
|
||||
* elsecomputed inside this function)
|
||||
* @param string $output output from the _setDisplayMode method
|
||||
*
|
||||
* @dataProvider providerForTestSetDisplayModeCase3
|
||||
*/
|
||||
public function testSetDisplayModeCase3($the_disp_mode, $the_total, $output){
|
||||
public function testSetDisplayModeCase3($the_disp_mode, $the_total, $output)
|
||||
{
|
||||
|
||||
$GLOBALS['is_count'] = false;
|
||||
$GLOBALS['is_maint'] = false;
|
||||
@ -264,7 +279,8 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* Test for _isSelect function
|
||||
*/
|
||||
public function testisSelect(){
|
||||
public function testisSelect()
|
||||
{
|
||||
|
||||
$GLOBALS['is_count'] = false;
|
||||
$GLOBALS['is_export'] = false;
|
||||
@ -283,15 +299,18 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $caption iconic caption for button
|
||||
* @param string $title text for button
|
||||
* @param integer $pos position for next query
|
||||
* @param string $html_sql_query query ready for display
|
||||
* @param $output output from the _getTableNavigationButton method
|
||||
* @param string $caption iconic caption for button
|
||||
* @param string $title text for button
|
||||
* @param integer $pos position for next query
|
||||
* @param string $html_sql_query query ready for display
|
||||
* @param string $output output from the _getTableNavigationButton
|
||||
* method
|
||||
*
|
||||
* @dataProvider providerForTestGetTableNavigationButton
|
||||
*/
|
||||
public function testGetTableNavigationButton($caption, $title, $pos, $html_sql_query, $output){
|
||||
public function testGetTableNavigationButton(
|
||||
$caption, $title, $pos, $html_sql_query, $output
|
||||
) {
|
||||
|
||||
$GLOBALS['cfg']['NavigationBarIconic'] = true;
|
||||
$GLOBALS['cfg']['AjaxEnable'] = true;
|
||||
@ -326,11 +345,14 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
* @param integer $pos_next the offset for the "next" page
|
||||
* @param integer $pos_prev the offset for the "previous" page
|
||||
* @param string $id_for_direction_dropdown the id for the direction dropdown
|
||||
* @param $output output from the _getTableNavigation method
|
||||
* @param string $output output from the _getTableNavigation
|
||||
* method
|
||||
*
|
||||
* @dataProvider providerForTestGetTableNavigation
|
||||
*/
|
||||
public function testGetTableNavigation($pos_next, $pos_prev, $id_for_direction_dropdown, $output){
|
||||
public function testGetTableNavigation(
|
||||
$pos_next, $pos_prev, $id_for_direction_dropdown, $output
|
||||
) {
|
||||
|
||||
$_SESSION['tmp_user_values']['max_rows'] = '20';
|
||||
$GLOBALS['cfg']['AjaxEnable'] = true;
|
||||
@ -343,10 +365,12 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$_SESSION['tmp_user_values']['disp_direction'] = '1';
|
||||
|
||||
$this->assertEquals(
|
||||
str_word_count($this->_callPrivateFunction(
|
||||
'_getTableNavigation',
|
||||
array($pos_next, $pos_prev, $id_for_direction_dropdown)
|
||||
)),
|
||||
str_word_count(
|
||||
$this->_callPrivateFunction(
|
||||
'_getTableNavigation',
|
||||
array($pos_next, $pos_prev, $id_for_direction_dropdown)
|
||||
)
|
||||
),
|
||||
$output
|
||||
);
|
||||
}
|
||||
@ -364,11 +388,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'526'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for testGetResettedClassForInlineEdit
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForTestGetResettedClassForInlineEdit()
|
||||
@ -385,10 +409,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getResettedClassForInlineEdit
|
||||
*
|
||||
*
|
||||
* @param string $grid_edit_class the class for all editable columns
|
||||
* @param string $not_null_class the class for not null columns
|
||||
* @param string $relation_class the class for relations in a column
|
||||
@ -396,7 +420,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
* @param string $field_type_class the class related to type of the field
|
||||
* @param integer $row_no the row index
|
||||
* @param string $output output of__getResettedClassForInlineEdit
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForTestGetResettedClassForInlineEdit
|
||||
*/
|
||||
public function testGetResettedClassForInlineEdit(
|
||||
@ -407,8 +431,8 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['BrowseMarkerEnable'] = true;
|
||||
$GLOBALS['printview'] = 2;
|
||||
$_SESSION['tmp_user_values']['disp_direction']
|
||||
= PMA_DisplayResults::DISP_DIR_VERTICAL;
|
||||
|
||||
= PMA_DisplayResults::DISP_DIR_VERTICAL;
|
||||
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction(
|
||||
'_getResettedClassForInlineEdit',
|
||||
@ -434,7 +458,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'datetimefield'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getClassForDateTimeRelatedFields - case 2
|
||||
*/
|
||||
@ -448,7 +472,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'datefield'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getClassForDateTimeRelatedFields - case 3
|
||||
*/
|
||||
@ -462,10 +486,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Provide data for testGetOperationLinksForVerticleTableCase1
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForTestGetOperationLinksForVerticleTableCase1()
|
||||
@ -500,11 +524,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Test for _getOperationLinksForVerticleTable - case 1
|
||||
*
|
||||
*
|
||||
* @param array $vertical_display the information to display
|
||||
* @param string $operation edit/copy/delete
|
||||
* @param string $output output of _getOperationLinksForVerticleTable
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForTestGetOperationLinksForVerticleTableCase1
|
||||
*/
|
||||
public function testGetOperationLinksForVerticleTableCase1(
|
||||
@ -518,10 +542,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Provide data for testGetOperationLinksForVerticleTableCase2
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForTestGetOperationLinksForVerticleTableCase2()
|
||||
@ -548,9 +572,9 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
),
|
||||
'edit',
|
||||
'<tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="odd edit_row_anchor row_0 vpointer vmarker center" ><span class="nowrap">\n<a href="tbl_change.php?db=data&table=new&where_clause=%60new%60.%60id%60+%3D+1&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60new%60&goto=sql.php&default_action=update&token=a41d74bba668a938d5822179770ab75e" ><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span></a>\n<input type="hidden" class="where_clause" value ="%60new%60.%60id%60+%3D"...</tr>
|
||||
'
|
||||
)
|
||||
@ -559,11 +583,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Test for _getOperationLinksForVerticleTable - case 2
|
||||
*
|
||||
*
|
||||
* @param array $vertical_display the information to display
|
||||
* @param string $operation edit/copy/delete
|
||||
* @param string $output output of _getOperationLinksForVerticleTable
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForTestGetOperationLinksForVerticleTableCase2
|
||||
*/
|
||||
public function testGetOperationLinksForVerticleTableCase2(
|
||||
@ -577,11 +601,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Provide data for testGetOperationLinksForVerticleTableCase3
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForTestGetOperationLinksForVerticleTableCase3()
|
||||
@ -608,9 +632,9 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
),
|
||||
'delete',
|
||||
'<tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="odd row_0 vpointer vmarker center" >\n<a href="sql.php?db=data&table=new&sql_query=DELETE+FROM+%60data%60.%60new%60+WHERE+%60new%60.%60id%60+%3D+1&message_to_show=The+row+has+been+deleted&goto=sql.php%3Fdb%3Ddata%26table%3Dnew%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560new%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3Da41d74bba668a938d5822179770ab75e&token=a41d74bba668a938d5822179770ab75e" onclick="return confirmLink(this, \'DEL"...</tr>
|
||||
'
|
||||
)
|
||||
@ -619,11 +643,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Test for _getOperationLinksForVerticleTable - case 3
|
||||
*
|
||||
*
|
||||
* @param array $vertical_display the information to display
|
||||
* @param string $operation edit/copy/delete
|
||||
* @param string $output output of _getOperationLinksForVerticleTable
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForTestGetOperationLinksForVerticleTableCase3
|
||||
*/
|
||||
public function testGetOperationLinksForVerticleTableCase3(
|
||||
@ -637,10 +661,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetCheckBoxesForMultipleRowOperations
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetCheckBoxesForMultipleRowOperations()
|
||||
@ -728,14 +752,14 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getCheckBoxesForMultipleRowOperations
|
||||
*
|
||||
*
|
||||
* @param array $vertical_display the information to display
|
||||
* @param string $dir _left / _right
|
||||
* @param string $output output of _getCheckBoxesForMultipleRowOperations
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetCheckBoxesForMultipleRowOperations
|
||||
*/
|
||||
public function testGetCheckBoxesForMultipleRowOperations(
|
||||
@ -750,7 +774,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getOffsets - case 1
|
||||
*/
|
||||
@ -762,7 +786,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
array(0, 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getOffsets - case 2
|
||||
*/
|
||||
@ -775,10 +799,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
array(9, 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetSortParamsCase1
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetSortParamsCase1()
|
||||
@ -787,13 +811,13 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
array('', array('', '', ''))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getSortParams - case 1
|
||||
*
|
||||
*
|
||||
* @param string $order_by_clause the order by clause of the sql query
|
||||
* @param string $output output of _getSortParams
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetSortParamsCase1
|
||||
*/
|
||||
public function testGetSortParamsCase1($order_by_clause, $output)
|
||||
@ -805,10 +829,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetSortParamsCase2
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetSortParamsCase2()
|
||||
@ -824,13 +848,13 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getSortParams - case 2
|
||||
*
|
||||
*
|
||||
* @param string $order_by_clause the order by clause of the sql query
|
||||
* @param string $output output of _getSortParams
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetSortParamsCase2
|
||||
*/
|
||||
public function testGetSortParamsCase2($order_by_clause, $output)
|
||||
@ -842,10 +866,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetCheckboxForMultiRowSubmissions
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetCheckboxForMultiRowSubmissions()
|
||||
@ -876,7 +900,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Test for _getCheckboxForMultiRowSubmissions
|
||||
*
|
||||
*
|
||||
* @param string $del_url delete url
|
||||
* @param array $is_display array with explicit indexes for all
|
||||
* the display elements
|
||||
@ -888,7 +912,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
* @param string $class css classes for the td element
|
||||
* @param string $output output of _getSortParams
|
||||
* @param string $output output of _getCheckboxForMultiRowSubmissions
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetCheckboxForMultiRowSubmissions
|
||||
*/
|
||||
public function testGetCheckboxForMultiRowSubmissions(
|
||||
@ -901,15 +925,15 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
array(
|
||||
$del_url, $is_display, $row_no, $where_clause_html,
|
||||
$condition_array, $del_query, $id_suffix, $class
|
||||
)
|
||||
)
|
||||
),
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetEditLink
|
||||
*
|
||||
*
|
||||
* @return array parametres and output
|
||||
*/
|
||||
public function dataProviderForGetEditLink()
|
||||
@ -927,26 +951,26 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getEditLink
|
||||
*
|
||||
*
|
||||
* @param string $edit_url edit url
|
||||
* @param string $class css classes for td element
|
||||
* @param string $edit_str text for the edit link
|
||||
* @param string $where_clause where clause
|
||||
* @param string $where_clause_html url encoded where clause
|
||||
* @param string $output output of _getEditLink
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetEditLink
|
||||
*/
|
||||
public function testGetEditLink(
|
||||
$edit_url, $class, $edit_str, $where_clause, $where_clause_html, $output
|
||||
) {
|
||||
|
||||
|
||||
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
|
||||
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
|
||||
|
||||
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction(
|
||||
'_getEditLink',
|
||||
@ -956,12 +980,12 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
),
|
||||
$output
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetCopyLink
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetCopyLink()
|
||||
@ -979,26 +1003,26 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getCopyLink
|
||||
*
|
||||
*
|
||||
* @param string $copy_url copy url
|
||||
* @param string $copy_str text for the copy link
|
||||
* @param string $where_clause where clause
|
||||
* @param string $where_clause_html url encoded where clause
|
||||
* @param string $class css classes for the td element
|
||||
* @param string $output output of _getCopyLink
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetCopyLink
|
||||
*/
|
||||
public function testGetCopyLink(
|
||||
$copy_url, $copy_str, $where_clause, $where_clause_html, $class, $output
|
||||
) {
|
||||
|
||||
|
||||
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
|
||||
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
|
||||
|
||||
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction(
|
||||
'_getCopyLink',
|
||||
@ -1009,10 +1033,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetDeleteLink
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetDeleteLink()
|
||||
@ -1029,25 +1053,25 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getDeleteLink
|
||||
*
|
||||
*
|
||||
* @param string $del_url delete url
|
||||
* @param string $del_str text for the delete link
|
||||
* @param string $js_conf text for the JS confirmation
|
||||
* @param string $class css classes for the td element
|
||||
* @param string $output output of _getDeleteLink
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetDeleteLink
|
||||
*/
|
||||
public function testGetDeleteLink(
|
||||
$del_url, $del_str, $js_conf, $class, $output
|
||||
) {
|
||||
|
||||
|
||||
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
|
||||
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
|
||||
|
||||
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction(
|
||||
'_getDeleteLink',
|
||||
@ -1058,10 +1082,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetCheckboxAndLinksCase1
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetCheckboxAndLinksCase1()
|
||||
@ -1105,10 +1129,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getCheckboxAndLinks - case 1
|
||||
*
|
||||
*
|
||||
* @param string $position the position of the checkbox and links
|
||||
* @param string $del_url delete url
|
||||
* @param array $is_display array with explicit indexes for all the
|
||||
@ -1127,7 +1151,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
* @param string $del_str text for the delete link
|
||||
* @param string $js_conf text for the JS confirmation
|
||||
* @param string $output output of _getCheckboxAndLinks
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetCheckboxAndLinksCase1
|
||||
*/
|
||||
public function testGetCheckboxAndLinksCase1(
|
||||
@ -1135,7 +1159,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$where_clause_html, $condition_array, $del_query, $id_suffix, $edit_url,
|
||||
$copy_url, $class, $edit_str, $copy_str, $del_str, $js_conf, $output
|
||||
) {
|
||||
|
||||
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction(
|
||||
'_getCheckboxAndLinks',
|
||||
@ -1149,10 +1173,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetCheckboxAndLinksCase2
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetCheckboxAndLinksCase2()
|
||||
@ -1196,10 +1220,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getCheckboxAndLinks - case 2
|
||||
*
|
||||
*
|
||||
* @param string $position the position of the checkbox and links
|
||||
* @param string $del_url delete url
|
||||
* @param array $is_display array with explicit indexes for all the
|
||||
@ -1218,7 +1242,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
* @param string $del_str text for the delete link
|
||||
* @param string $js_conf text for the JS confirmation
|
||||
* @param string $output output of _getCheckboxAndLinks
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetCheckboxAndLinksCase2
|
||||
*/
|
||||
public function testGetCheckboxAndLinksCase2(
|
||||
@ -1226,7 +1250,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$where_clause_html, $condition_array, $del_query, $id_suffix, $edit_url,
|
||||
$copy_url, $class, $edit_str, $copy_str, $del_str, $js_conf, $output
|
||||
) {
|
||||
|
||||
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction(
|
||||
'_getCheckboxAndLinks',
|
||||
@ -1240,10 +1264,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetCheckboxAndLinksCase3
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetCheckboxAndLinksCase3()
|
||||
@ -1281,10 +1305,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _getCheckboxAndLinks - case 3
|
||||
*
|
||||
*
|
||||
* @param string $position the position of the checkbox and links
|
||||
* @param string $del_url delete url
|
||||
* @param array $is_display array with explicit indexes for all the
|
||||
@ -1303,7 +1327,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
* @param string $del_str text for the delete link
|
||||
* @param string $js_conf text for the JS confirmation
|
||||
* @param string $output output of _getCheckboxAndLinks
|
||||
*
|
||||
*
|
||||
* @dataProvider dataProviderForGetCheckboxAndLinksCase3
|
||||
*/
|
||||
public function testGetCheckboxAndLinksCase3(
|
||||
@ -1311,7 +1335,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$where_clause_html, $condition_array, $del_query, $id_suffix, $edit_url,
|
||||
$copy_url, $class, $edit_str, $copy_str, $del_str, $js_conf, $output
|
||||
) {
|
||||
|
||||
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction(
|
||||
'_getCheckboxAndLinks',
|
||||
@ -1325,7 +1349,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test for _mimeDefaultFunction
|
||||
*/
|
||||
@ -1339,10 +1363,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
"A 'quote' is <b>bold</b>"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data provider for testGetPlacedLinks
|
||||
*
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForGetPlacedLinks()
|
||||
@ -1383,7 +1407,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Test for _getPlacedLinks
|
||||
*
|
||||
*
|
||||
* @param string $dir the direction of links should place
|
||||
* @param string $del_url the url for delete row
|
||||
* @param array $is_display which elements to display
|
||||
@ -1400,15 +1424,15 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
* @param string $copy_str the label for copy row
|
||||
* @param string $del_str the label for delete row
|
||||
* @param string $js_conf text for the JS confirmation
|
||||
* @param string $output output of _getPlacedLinks
|
||||
*
|
||||
* @param string $output output of _getPlacedLinks
|
||||
*
|
||||
* @dataProvider dataProviderForGetPlacedLinks
|
||||
*/
|
||||
public function testGetPlacedLinks(
|
||||
$dir, $del_url, $is_display, $row_no, $where_clause, $where_clause_html,
|
||||
$condition_array, $del_query, $dir_letter, $edit_url, $copy_url,
|
||||
$edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf, $output
|
||||
) {
|
||||
) {
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction(
|
||||
'_getPlacedLinks',
|
||||
@ -1422,6 +1446,6 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -33,6 +33,9 @@ class PMA_ThemeTest extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['SQP']['fmtColor'] = array('fake' => 'red');
|
||||
$GLOBALS['text_dir'] = 'ltr';
|
||||
require 'themes/pmahomme/layout.inc.php';
|
||||
$_SESSION[' PMA_token '] = 'token';
|
||||
$GLOBALS['lang'] = 'en';
|
||||
$GLOBALS['server'] = '99';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -222,7 +225,7 @@ class PMA_ThemeTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->assertEquals(
|
||||
$this->object->getPrintPreview(),
|
||||
'<div class="theme_preview"><h2> (0.0.0.0) </h2><p><a target="_top" class="take_theme" name="" href="index.php?set_theme=">No preview available.[ <strong>take it</strong> ]</a></p></div>'
|
||||
'<div class="theme_preview"><h2> (0.0.0.0) </h2><p><a target="_top" class="take_theme" name="" href="index.php?set_theme=&server=99&lang=en&token=token">No preview available.[ <strong>take it</strong> ]</a></p></div>'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -102,7 +102,12 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
}
|
||||
$this->assertEquals(
|
||||
PMA_Bookmark_save('phpmyadmin'),
|
||||
PMA_Bookmark_save(array(
|
||||
'dbase' => 'phpmyadmin',
|
||||
'user' => 'phpmyadmin',
|
||||
'query' => 'SELECT "phpmyadmin"',
|
||||
'label' => 'phpmyadmin',
|
||||
)),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
55
test/libraries/PMA_mime_test.php
Normal file
55
test/libraries/PMA_mime_test.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* tests for mime.lib.php
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include to test.
|
||||
*/
|
||||
|
||||
require_once 'libraries/mime.lib.php';
|
||||
|
||||
class PMA_mime_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Test for PMA_detectMIME
|
||||
* @param string $test
|
||||
* @param $output
|
||||
*
|
||||
* @dataProvider providerForTestPMA_detectMIME
|
||||
*/
|
||||
public function testPMA_detectMIME($test, $output){
|
||||
|
||||
$this->assertEquals(
|
||||
PMA_detectMIME($test),
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provider for testPMA_detectMIME
|
||||
*/
|
||||
public function providerForTestPMA_detectMIME(){
|
||||
return array(
|
||||
array(
|
||||
'pma',
|
||||
'application/octet-stream'
|
||||
),
|
||||
array(
|
||||
'GIF',
|
||||
'image/gif'
|
||||
),
|
||||
array(
|
||||
"\x89PNG",
|
||||
'image/png'
|
||||
),
|
||||
array(
|
||||
chr(0xff).chr(0xd8),
|
||||
'image/jpeg'
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user