Maurício Meneghini Fauth
0bf7c0fa18
Suppress deprecation message of E_STRICT constant
...
The E_STRICT constant was deprecated in PHP 8.4.
It's still a possible error level when using PHP 7.2 and PHP 7.3.
See:
https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-10-15 17:18:30 -03:00
Maurício Meneghini Fauth
555ea56cbd
Make PHPUnit's assertions stricter
...
Backports #18993 to QA_5_2.
This makes merging QA_5_2 into master easier.
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-10-12 15:33:45 -03:00
Maurício Meneghini Fauth
7fc96d6621
Call PHPUnit static methods using static calls
...
Backports #18907 to QA_5_2.
This makes merging QA_5_2 into master easier.
Changes done using Rector.
- #18907
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-10-12 14:28:22 -03:00
Maurício Meneghini Fauth
46f2c8871c
Backport some fixes for PHPUnit 10 compatibility
...
- Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070623
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-08-13 20:13:18 -03:00
Maximilian Krög
d716e30e60
Change deprecated ReflectionProperty method call
...
Is being deprecated in PHP 8.3
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2023-07-20 01:30:37 +02:00
Maurício Meneghini Fauth
7b88ab16af
Fix a case where a fatal error message was not displayed
...
A fatal error message was not displayed when the ResponseRenderer object
already had some HTML, because the output buffer is only displayed when
there is no HTML.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-03 17:01:51 -03:00
Maurício Meneghini Fauth
827e32a92e
Improve ErrorHandler::handleException to show errors
...
It doesn't shows a blank page when not in development environment
anymore.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-05-19 20:56:24 -03:00
Maurício Meneghini Fauth
44fe103b9c
Remove @access annotations
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-22 11:43:45 -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
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
William Desportes
8d19bef81d
Merge branch 'QA_5_1'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-22 23:19:15 +02:00
William Desportes
38c263359e
Ref #17084 - comment the code and add a new test case
...
And fix the modified test
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-20 02:30:02 +02:00
Craig McNeill
af835bc52c
Fix ErrorHandler sliceErrors not returning errors
...
Signed-off-by: Craig McNeill <craig@mmddata.ca>
2021-08-18 14:40:52 -04: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
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
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
2358b9c4f9
Fix missing property type hints
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-22 21:42:22 -03:00
William Desportes
f993c46e76
Fix failing tests and failing GitTest
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-07-18 10:53:48 +02:00
William Desportes
e78eb340bc
Some code improvements and fixes related to issue reported by Scrutinizer
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-07-18 10:29:15 +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
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
7e81b0b3d7
Merge callProtectedMethod and callPrivateFunction into callFunction
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-21 22:59:29 +02:00
William Desportes
5c270d863d
Move callProtectedFunction to abstract class
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-21 21:58:41 +02:00
William Desportes
5195520883
Coding standard fixes
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-21 02:18:05 +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
f063c553f2
Fix some tests executed in random order
...
Using: ./vendor/bin/phpunit --order-by=random --random-order-seed=1589977275 --exclude=selenium --no-coverage --filter=FormDisplayTest
Seeds: 1590000479, 1589977275, 1589998302, x1590001040, x1590001183
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-20 21:10:32 +02: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
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
6584b01824
Use short versions of scalar types in PHP docs
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-23 12:20:04 -03: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
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
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
92cc67fbf7
Replace assertContains() with assertStringContainsString()
...
Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.
Using assertNotContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringNotContainsString() or assertStringNotContainsStringIgnoringCase() instead.
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
William Desportes
e816e45c18
phpstan level 0 ( #14405 )
...
* Fix phpdoc @return
- Fixed @return typehint
Signed-off-by: William Desportes <williamdes@wdes.fr>
* Fix incorrect case on function calls
Signed-off-by: William Desportes <williamdes@wdes.fr>
* Type hint + typo fix
Signed-off-by: William Desportes <williamdes@wdes.fr>
* Fixes
- @return fix
- @var fix
- Class names
- Throws fix
- test/classes/Plugins/Export/ExportSqlTest.php any() invoked with 1 parameter, 0 required
- libraries/classes/Controllers/Table/TableStructureController.php Array has 2 duplicate keys with value 'columns_list'
- Call parent constructor libraries/classes/Error.php
Signed-off-by: William Desportes <williamdes@wdes.fr>
* Update config
Signed-off-by: William Desportes <williamdes@wdes.fr>
* Access to an undefined property
- Access to an undefined property PhpMyAdmin\Plugins\Schema\Pdf\PdfRelationSchema::$diagram_row
- Access to an undefined property PhpMyAdmin\Plugins\Schema\Pdf\Pdf::$cMargin
- Undefined properties
Signed-off-by: William Desportes <williamdes@wdes.fr>
* Update config
Signed-off-by: William Desportes <williamdes@wdes.fr>
* Fix bootstrap-phpstan
Signed-off-by: William Desportes <williamdes@wdes.fr>
* Fix typos and phpstan config
Fixes : #14399
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-06-25 20:34:46 -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
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
Gabriel Caruso
d0b3ca5d48
Refactoring tests
...
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2017-12-12 06:46:53 -02:00
Scrutinizer Auto-Fixer
40f56c0a95
Remove not needed use statements
...
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-23 18:49:37 +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
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