Maurício Meneghini Fauth
6a2c12bdc8
Add missing traversable type hints
...
Replace array type hint with mixed[] type hint, since it means the same.
This way it's possible to require traversable type hint for new code.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-04-02 01:32:12 -03:00
Maurício Meneghini Fauth
dd885dc7b8
Use single-line arrays when possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-27 17:39:17 -03:00
Kamil Tekiela
276577ca2a
Remove $GLOBALS['PMA_PHP_SELF'] ( #18149 )
...
* Remove $GLOBALS['PMA_PHP_SELF']
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove $GLOBALS['PMA_PHP_SELF'] from tests
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Moved cleanupPathInfo to Routing
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove parse_url from getRootPath
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Update baselines
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove invalid tests
Surely, we never expect PATH to be backslash delimited. The code is not designed to handle this and the tests for this don't make much sense.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Fix trailing slash in path
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-27 17:56:27 -03:00
Maurício Meneghini Fauth
16a0660a78
Add native property types to test classes
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-27 01:17:22 -03:00
Maurício Meneghini Fauth
556594b4cd
Fix coding standard spacing issues
...
- Fixes one line doc comments
- Fixes parent call spacing
- Fixes constant spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 21:06:17 -03:00
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
4ff3724c3f
Use union with null instead of short nullable type
...
Since union type are now possible, using union with null makes more
clear that it is a union type.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 21:48:19 -03:00
Maurício Meneghini Fauth
63d57b1f1c
Push dbi and dummyDbi members down
...
The idea is to only load the DBI when needed.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-13 00:15:53 -03:00
Maurício Meneghini Fauth
72a69471e8
Remove the AbstractTestCase::assertAllSelectsConsumed method
...
Uses the DummyDbi method instead.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-11 16:38:37 -03:00
Maurício Meneghini Fauth
4930c7a119
Remove the AbstractTestCase::assertAllQueriesConsumed method
...
Uses the DummyDbi method instead.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-11 14:58:11 -03:00
Maurício Meneghini Fauth
989d3903e1
Fix coding standard issues after #17241 merge
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-13 10:37:54 -03:00
William Desportes
f718f475e4
Merge branch 'QA_5_1'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-12-12 19:35:54 +01:00
William Desportes
d2cd67f8dc
#16746 - Replace samyoul/u2f-php-server by code-lts/u2f-php-server
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-12-12 12:16:52 +01:00
Maurício Meneghini Fauth
d49c243469
Use @requires annotation for required extensions
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-10-07 13:40:50 -03:00
Maurício Meneghini Fauth
67e96cf40c
Get default config values from Config\Settings classes
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-30 12:04:47 -03:00
William Desportes
2d307ed062
Merge branch 'QA_5_1'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-31 00:18:17 +02:00
William Desportes
2b177839bf
Fix tests after dc5cf4766b
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-28 04:08:11 +02:00
William Desportes
2c28a715b4
Add methods to DbiDummy and AbstractTestCase to control changing databases
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-24 02:01:00 +02:00
William Desportes
880043961e
Merge branch 'QA_5_1'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-11 02:53:56 +02:00
William Desportes
c28014d24b
Un-mock TwoFactorTest - Add tests for #15724
...
Two years ago I made the fix 6c35ea3be7 but no tests seem to back up this behavior
Now that I removed the mocks, it is safe
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-11 02:37:20 +02: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
33d711215d
Remove the PMA_VERSION constant
...
Uses the PhpMyAdmin\Version::VERSION constant instead.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-08 22:22:55 -03:00
Maurício Meneghini Fauth
7e33d227f5
Rename the PMA_Config global variable to config
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-08 15:03:12 -03:00
Maurício Meneghini Fauth
d83abf63e7
Use PSR-12 for control structures spacing
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 15:27:03 -03:00
Maurício Meneghini Fauth
0b8edc5bde
Use PSR-12 for namespace use statements
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 14:18:35 -03:00
William Desportes
76803f9422
Replace deprecated ->setMethods by ->onlyMethods
...
See: https://github.com/sebastianbergmann/phpunit/pull/3687
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-04 23:24:25 +01:00
William Desportes
d7a27c3355
#16407 - Make all versions of pragmarx/google2fa below 6.1.0 incompatible
...
Because of this commit: c1bb594de1
Fixed the tests for newer versions.
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-11-13 09:52:58 +01: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
ceac762e09
Remove pmaThemePath and pmaThemeImage PHP globals
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-02 10:57:57 -03:00
William Desportes
0340f66740
Fix some tests having wrong typehints
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-07-17 23:55:49 +02:00
William Desportes
a80153a633
Add typehints using phpcbf on test/*
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-07-17 22:52:42 +02: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
3baad2eb1c
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-25 22:42:37 -03:00
William Desportes
d82eb1b24a
Mark extensions to skip tests on minimal php setups
...
This will help people packaging phpMyAdmin and also make our test suite runnable by more people.
Tested on alpine with the minimal extensions:
php-dom php-iconv php-mysqli php-json php-mbstring php-iconv php-session
[PHP Modules]
Core
date
dom
filter
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
readline
Reflection
session
SPL
standard
zlib
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-25 23:20:53 +02:00
William Desportes
49a6d6e8d0
Use AbstractTestCase instead of PmaTestCase for all tests not needing mockResponse
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-22 01:45:50 +02:00
William Desportes
ae575ffb14
Fix running tests in --process-isolation
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-21 16:21:20 +02:00
William Desportes
8f7d3d1fa7
Fix test cases after backupGlobals = false
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-21 02:07:45 +02: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
0b2c24ee26
Use ::class in tests
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-20 12:15:40 +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
Maurício Meneghini Fauth
a64393e7f5
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-13 00:23:28 -03:00
William Desportes
54e0250dae
Merge branch 'QA_5_0'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-04-18 12:50:30 +02:00
William Desportes
62a6591d3f
Fix some phpcs issues after latest phpcs 3.5.5 release
...
I left the false positives unfixed: https://github.com/squizlabs/PHP_CodeSniffer/issues/2937#issuecomment-615498860
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-04-18 01:01:38 +02:00
Maurício Meneghini Fauth
676f48349a
Reference global funcs and consts via use statement
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-21 22:13:36 -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
50bc4ab37f
Remove useless PHP docs for functions
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 13:20:01 -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
afe8839519
Remove __get method from TwoFactor class
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-08-02 00:36:06 -03:00
Maurício Meneghini Fauth
88c28f095a
Fix some errors detected by PHPStan
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-08-01 19:04:27 -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