Commit Graph

158 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
42166cac37 Remove use statements within the same namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-21 19:47:56 -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
285907991e Add coding standard rules for whitespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-19 22:29:54 -03:00
William Desportes
3311c089c4
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-07 21:25:25 +01:00
bepsvpt
fd553a45d5
Update and revert "Remove a test that can not be predictible"
This reverts commit a6155da6a9.

Co-authored-by: bepsvpt <og7lsrszah6y3lz@infinitefa.email>

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-07 21:02:04 +08:00
William Desportes
106ec8dee2
Merge branch 'QA_5_0'
[ci skip]
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-07 01:36:03 +01:00
William Desportes
a6155da6a9
Remove a test that can not be predictible
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-07 00:28:35 +01:00
William Desportes
c1c8e09586
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 23:45:16 +01:00
William Desportes
21c2bcdbb3
Add Unit tests
Closes #15752

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 21:45:49 +01:00
Maurício Meneghini Fauth
39f42f848b Remove some useless docblock comments
Fixes docblock spacing

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-13 21:15:00 -03:00
Maurício Meneghini Fauth
dd2b05330a Remove useless parentheses
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-12 00:18:01 -03:00
Maurício Meneghini Fauth
77518d341e Remove unused use statements
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-11 21:20:58 -03:00
William Desportes
900673ea35
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-09 21:17:06 +01:00
William Desportes
5e271bd93b
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-09 21:16:43 +01:00
William Desportes
fd2b172365
Fix #15621 - Support CloudFront-Forwarded-Proto header
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-09 21:10:12 +01:00
Maurício Meneghini Fauth
351e34ecf5 Upgrade PHPStan to version 0.12.0
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-07 20:26:39 -03:00
Maurício Meneghini Fauth
7ac1d21c70 Fix some PHPStan level 2 errors
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-05 19:50:24 -03:00
Maurício Meneghini Fauth
dd06cd38f8 Defines rules for double quote usage
Makes sure that any use of double quotes strings are warranted.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-01 14:10:07 -03:00
William Desportes
519aeadbc8
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-03 15:58:13 +01:00
William Desportes
c7f7f9c6c0
Merge branch 'QA_4_9' into QA_5_0
Revert: 45d46a6316

Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-03 15:52:51 +01:00
William Desportes
09464ba8f5
Fix unit tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-30 00:06:12 +01:00
William Desportes
0cdbaf0adf
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-29 00:32:24 +01:00
William Desportes
d6da466fc0
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-29 00:29:16 +01:00
William Desportes
0eeb98275e
Merge #15514 - Unit test fixes for phpunit 8 compatibility
Pull-request: #15514
Ref: #15236

Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-28 22:30:40 +01:00
Maurício Meneghini Fauth
1a2cef1ae1 Fix some coding standard issues detected by PHPCS
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-10-21 09:57:06 -03:00
William Desportes
eb33bbb76f
Use try catch instead of expectException from framework
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-19 21:19:04 +02:00
William Desportes
c7644039b4
Add groups to tests and fix one
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-19 21:17:06 +02:00
William Desportes
cdf0f2efe8
Fix some deprecated phpunit methods
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-10-19 21:17:06 +02: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
e1f9ae00cd Add a trailing comma in multi-line arrays
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-14 14:09:26 -03:00
Maurício Meneghini Fauth
c8f84fc748 Replace is_null with identical comparison with null
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-12 13:28:22 -03:00
Maurício Meneghini Fauth
5254ec1b65 Refactor Navigation\NavigationTree
- Extract HTML from renderState() and renderDbSelect()
- Use DI for $dbi instead of global
- Fix tests

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-24 02:25:48 -03:00
Maurício Meneghini Fauth
74105ab85c Replace readAttribute() and assertAttributeEquals()
assertAttributeEquals() is deprecated and will be removed in PHPUnit 9.
readAttribute() is deprecated and will be removed in PHPUnit 9.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-24 16:32:28 -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
4cee0cbc12 Adds space after not (!) and type cast
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-05 21:56:34 -02:00
Maurício Meneghini Fauth
999b4d14f0 Fix some coding standard errors
- Fixes array identation
- Removes empty statements

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-05 21:25:08 -02:00
Maurício Meneghini Fauth
3a7e1503ac Fix some coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-04 19:42:10 -02:00
Maurício Meneghini Fauth
38e5b12c1c Define an absolute path to use for require statements
Fixes #6167

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-12-22 14:37:31 -02:00
Maurício Meneghini Fauth
ceee227e10 Fix ConfigTest phpcs errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-12-21 18:15:36 -02:00
William Desportes
fe587e05b4
Merge branch 'QA_4_8'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-12-21 17:10:11 +01:00
William Desportes
a8148f1fa7
Add tests for #14635
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-12-21 15:35:59 +01:00
William Desportes
a6b6792cfb
Added tests for Config::checkGitRevision and Config::isGitRevision
#14253
Cherry-Picked-From: 9687dfbfd2
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-12-21 11:48:59 +01:00
William Desportes
cc2665121d
phpstan level 2 - fixes
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-11-25 13:57:57 +01:00
Maurício Meneghini Fauth
4c6993b2c2 Fix some tests on Windows
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-10-17 23:15:37 -03:00
Maurício Meneghini Fauth
2d58411bee Some coding style fixes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-06-18 21:30:06 -03:00
Maurício Meneghini Fauth
285e38e931 Fix some PSR-2 coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 09:07:56 -03: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
baf0985e5f Fix phpcs errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-18 01:59:38 -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
8bd91ffdaa Automatic phpcs fixes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-12 03:14:00 -03:00
William Desportes
9687dfbfd2
#14253 Git commit info not showing when the repository is a submodule
Added tests for Config::checkGitRevision and Config::isGitRevision

Closes: #14253
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-05-04 01:26:22 +02:00
Maurício Meneghini Fauth
c946c0d77d Fix broken tests from RelationTest
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-03 14:03:12 -03:00
Saksham Gupta
d701f6f0af Remove font size feature (#13925)
Fix #13919

Signed-off-by: Saksham Gupta <shucon01@gmail.com>
2018-04-14 07:21:13 -03:00
Maurício Meneghini Fauth
6f2f77c35b Upgrade PHPUnit to 6.5
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-12 23:56:01 -03:00
Maurício Meneghini Fauth
35eb2da38a Remove @ operator from function_exists
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-03-01 22:36:35 -03:00
Gabriel Caruso
21dacea6d1 Use assertNotSame
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-16 10:32:26 -02:00
Michal Čihař
3b6a994dcd Move collation connection setting to user preferences
It is now handled same way as other user settings.

Issue #11688
Issue #13466

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-29 14:16:31 +01:00
Michal Čihař
f9c73c7b10 Remove special casing for font size
It is now stored in configuration in same way as any other setting.

Issue #13466
Issue #11688

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-28 15:16:01 +01:00
Michal Čihař
ac856175a6 Move server selection to Config class
- move server selection from common.inc.php to Config class
- add tests covering most usual cases

Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-03 19:14:38 +02:00
Maurício Meneghini Fauth
c00245fa0a Move PMATestCase to PhpMyAdmin\Tests\PmaTestCase
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-30 16:34:53 -03: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
e2c83b954b Refactor relation functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-08-22 20:51:27 -03:00
Michal Čihař
51fb18612a Move Theme object out of session
Honestly I don't see good reason for storing Theme in session as loading
it from the session will take about same time as loading it from the
disk.

Additionally it seems that current code really didn't really use the
object stored in session, it was constructed with every request anyway
(by ThemeManager::initializeTheme).

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-17 14:18:35 +02:00
Maurício Meneghini Fauth
ca910e8de8 Move classes to PhpMyAdmin namespace
- Move Table to PhpMyAdmin namespace
- Move Template to PhpMyAdmin namespace
- Move ThemeManager to PhpMyAdmin namespace
- Move Theme to PhpMyAdmin namespace
- Move Tracker to PhpMyAdmin namespace
- Move Transformations to PhpMyAdmin namespace
- Move TypesMySQL to PhpMyAdmin namespace
- Move Types to PhpMyAdmin namespace
- Move Util to PhpMyAdmin namespace
- Move VersionInformation to PhpMyAdmin namespace
- Move Url to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-08 10:54:21 -03:00
Maurício Meneghini Fauth
13c0f7bc3c Move classes to PhpMyAdmin namespace
- Move Advisor to PhpMyAdmin namespace
- Move Bookmark to PhpMyAdmin namespace
- Move Charsets to PhpMyAdmin namespace
- Move Config class to PhpMyAdmin namespace
- Move Console class to PhpMyAdmin namespace
- Move Core to PhpMyAdmin namespace
- Move DatabaseInterface to PhpMyAdmin namespace
- Move DbList to PhpMyAdmin namespace
- Move DbQbe to PhpMyAdmin namespace
- Move DbSearch to PhpMyAdmin namespace
- Move DisplayResults to PhpMyAdmin namespace
- Move Encoding to PhpMyAdmin namespace
- Move Error to PhpMyAdmin namespace
- Move ErrorHandler to PhpMyAdmin namespace
- Move File to PhpMyAdmin namespace
- Move Font to PhpMyAdmin namespace
- Move Footer to PhpMyAdmin namespace
- Move Header to PhpMyAdmin namespace
- Move Index to PhpMyAdmin namespace
- Move IndexColumn to PhpMyAdmin namespace
- Move LanguageManager to PhpMyAdmin namespace
- Move Language to PhpMyAdmin namespace
- Move Linter to PhpMyAdmin namespace
- Move ListAbstract to PhpMyAdmin namespace
- Move ListDatabase to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-06-28 21:17:18 -03:00
Michal Čihař
941e861aba Define major version
This will be later used as compatiblity check for themes.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-15 09:47:15 +02:00
Michal Čihař
bb26e2e0d9 Remove deprecated variables
These should not be used for few years.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-15 09:47:15 +02:00
Maurício Meneghini Fauth
5366c507a5 Fix coding standard errors using vendor/bin/phpcbf
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-03-21 23:16:32 -03:00
Michal Čihař
234f93efff Various coding style and visibility fixes for #12852
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-08 10:51:25 +01:00
Michal Čihař
f86aca5b80 Merge branch 'QA_4_6' 2016-12-06 10:48:16 +01:00
Michal Čihař
e182ba9907 Revert to auto for further tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-06 10:31:50 +01:00
Michal Čihař
15bac5f512 Flag tests needing network access
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-06 10:31:50 +01:00
Michal Čihař
1a23eccd2b Remove code for MSIE 6
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-04 12:01:27 +02:00
Michal Čihař
d52e2cfbbf Move Util::httpRequest tests to UtilTest.php
Issue #12465

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 11:22:25 +02:00
Volkan Ulukut
be6944d0eb
Fixes #12380 Refactored http requests into one function "httpRequest" in Util.php
Signed-off-by: Volkan Ulukut <arthan@gmail.com>
2016-08-29 00:20:38 +03:00
Michal Čihař
23e01d306a Merge branch 'QA_4_6' 2016-08-17 15:38:22 +02:00
Michal Čihař
7898060916 Ensure PmaAbsoluteUri ends with /
This was probably most frequest user error we want to fix.

Issue #12374

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-17 15:37:20 +02:00
Michal Čihař
01b9db6b1c Rename getCookiePath() to getRootPath()
It is not used only for cookies, so generic name makes more sense.

Issue #12374

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-17 15:35:15 +02:00
Michal Čihař
6d8e1d7935 Merge branch 'QA_4_6' 2016-07-28 09:38:08 +02:00
Michal Čihař
4072c1d29a Use example.com for sample test urls
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-28 09:12:01 +02:00
Michal Čihař
ab29ec9947 Merge branch 'QA_4_6' 2016-05-27 11:12:58 +02:00
Michal Čihař
d78e173b34 Do not use dirname for calculating cookie path
It is wrong for this purpose as on Windows this uses \ for both
separating parts and generating result. This fixed calculation of cookie
path on Windows.

Fixes #12249

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-27 11:11:56 +02:00
Michal Čihař
c71e842349 Merge branch 'QA_4_6' 2016-05-26 18:06:14 +02:00
Michal Čihař
e72c1d4da9 Add more tests for getCookiePath (issue #12249)
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-26 18:04:23 +02:00
Michal Čihař
2c256da5e8 Merge commit '73fd0dc2a8f5471c717a887aae22bde97bc5498f' 2016-03-01 07:45:58 +01:00
Michal Čihař
a29f154f37 Merge branch 'MAINT_4_5_5-security' into QA_4_6-security 2016-02-29 10:35:47 +01:00
Durgesh
0b64827930 Refactored url parmeters generating, Issue #11990
Signed-off-by: Durgesh <007durgesh219@gmail.com>
2016-02-22 14:36:41 +05:30
Michal Čihař
86d3d0bc04 Define theme for all tests
This allows to unify environment.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-12 15:14:39 +01:00
Michal Čihař
2a01a5520d Merge branch 'QA_4_6' 2016-02-08 09:56:36 +01:00
Michal Čihař
de7181653f Correctly handle paths to exact files when setting cookie
We need to set path to folder not a given file.

Fixes #11916

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-08 09:54:57 +01:00
Michal Čihař
10e11fe67d Replace define by using Config class
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-08 09:36:27 +01:00
Michal Čihař
892d09cf74 Add more tests for getting cookie path
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 17:50:00 +01:00
Michal Čihař
ae1ccf3e6a Remove PmaAbsoluteUri configuration directive
Fixes #11412

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 17:41:29 +01:00
Michal Čihař
43ca165e9f Remove unused method checkCookiePath
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 17:34:32 +01:00
Michal Čihař
a569eeca93 Do not use PmaAbsoluteUri for getCookiePath
Issue #11412

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 17:32:32 +01:00
Michal Čihař
060aaf9c99 Remove detectHttps method
The isHttps method does the same and simpler.

Issue #11412

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 17:25:58 +01:00
Michal Čihař
a913f99817 Add detection based on REQUEST_URI as well
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 17:25:13 +01:00
Michal Čihař
49eb80d887 Rewrite tests for https detection
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 17:19:04 +01:00