Commit Graph

37 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
77957a69a5
Add trailing comma for multi-line functions
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 20:48:46 -03:00
Maurício Meneghini Fauth
5cbb878dda
Replace Heredoc strings with Nowdoc strings
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 16:46:21 -03:00
Kamil Tekiela
2bda275524 Add better type inference
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-20 18:55:03 +00:00
Maurício Meneghini Fauth
ca489f3b41
Improve type of DatabaseInterface::getLowerCaseNames()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-19 15:50:14 -03:00
Maurício Meneghini Fauth
d0d90551c3 Remove the dblist global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-13 21:08:00 -03:00
Umang Patel
fdb5528648
Use Database type instead of string (#17746)
* Refactored tryColumnCreationQuery function inside CreateAddField to use DatabaseName type instead of string
* Refactored exportDatabase and lockTables function to use DatabaseName type instead of string for database name

Signed-off-by: Umang Patel <umang.patel@healthengine.com.au>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-20 21:34:10 -03:00
Maurício Meneghini Fauth
ca5d7602e5 Fix failing ExportTest on PHP 8.1
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-12 21:14:50 -03:00
Maurício Meneghini Fauth
873eb098b9
Remove crlf global variable
The crlf global variable is only diferent for SQL export method,
otherwise is always the value of the PHP_EOL constant.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-13 14:08:57 -03:00
Maurício Meneghini Fauth
35f421a69b
Fix ExportTest failing test with PHP 8.1+
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-08-10 01:59:13 -03:00
Maurício Meneghini Fauth
93841ba16c
Add basic test for Export::exportServer
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-08-10 01:07:58 -03:00
Maurício Meneghini Fauth
9baf9235f2
Add basic test for Export::exportDatabase
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-08-09 23:22:18 -03:00
Maurício Meneghini Fauth
346923e20a
Set dbi only when the test needs it
Related to https://github.com/phpmyadmin/phpmyadmin/pull/17637

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-14 02:21:45 -03:00
Rodrigo Pokemaobr
be976e4b57 Adjusting parameters in ExportPlugin class
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2022-04-28 16:32:06 -03:00
Maurício Meneghini Fauth
f00d70cccb
Remove useless whitespaces
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-15 17:05:40 -03:00
Maurício Meneghini Fauth
f3b79d83c0
Add PHPUnit's Covers annotation on test classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-04 23:39:26 -03:00
Maurício Meneghini Fauth
db3da81056 Remove some useless comments
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-13 19:56:56 -03:00
Maurício Meneghini Fauth
47f0960dce Add return type declaration to test methods
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-07 11:31:33 -03:00
Maurício Meneghini Fauth
3ae05c785d Use short list syntax and single line arrays
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 03:32:59 -03:00
Maurício Meneghini Fauth
3baad2eb1c Fix some coding standard issues
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-25 22:42:37 -03:00
Maurício Meneghini Fauth
0b9c35a056 Remove uses statements from the same namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-24 13:00:24 -03:00
William Desportes
6eaa55e805
Call parent's setUp and tearDown
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-20 21:31:13 +02:00
William Desportes
8ef5143901
Use AbstractTestCase on all unit tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-20 21:15:06 +02:00
Maurício Meneghini Fauth
80a45fa0ae Break too long lines
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-16 18:08:20 -03:00
William Desportes
ba8946d5f8
Move some code to getFinalFilenameAndMimetypeForFilename and add tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-27 21:16:37 +01:00
Maurício Meneghini Fauth
206199105e Remove useless return type annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-23 13:03:29 -03:00
Maurício Meneghini Fauth
f80d3e3bd4 Remove unnecessary annotations
@package, @subpackage and others.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 17:35:56 -03:00
Maurício Meneghini Fauth
6283caaabf Use one line for comments with a single line
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 16:04:09 -03:00
Maurício Meneghini Fauth
1a14b3e4d3 Remove vim modelines
These settings are no longer required as they are guaranteed through
other coding standard tools.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-09-02 09:43:21 -03:00
Maurício Meneghini Fauth
7f793cdd59 Use DI for $dbi global in Export class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-17 22:10:43 -03:00
Maurício Meneghini Fauth
182491a73f Add void return type declaration for tests
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-22 21:33:55 -03:00
Maurício Meneghini Fauth
23c3579804 Format array declarations
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-07 14:31:39 -02:00
Maurício Meneghini Fauth
b9c0463d96 Use short array syntax instead of long array syntax
Replaces array() with [].

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 01:42:21 -03:00
Maurício Meneghini Fauth
dc8c92bfd8 Enable strict mode in test files
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-16 04:36:04 -03:00
Maurício Meneghini Fauth
2638eb9207 Refactor PhpMyAdmin\Export static methods
Replaces static methods with instance methods.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-03-31 19:28:25 -03:00
Gabriel Caruso
45828153b6 Use PSR-1 for PHPUnit TestCase
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2017-11-06 06:29:04 -02:00
Maurício Meneghini Fauth
df30240015 Add namespace to test classes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-20 13:03:50 -03:00
Maurício Meneghini Fauth
54cfbc5eda Refactor export functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-05 12:07:49 -03:00