Commit Graph

63 Commits

Author SHA1 Message Date
William Desportes
65c9f49c1e
Merge branch 'QA_5_1' into QA_5_2
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-06 15:45:57 +01:00
William Desportes
4e68f548f9
Ref #17298, #17344 - fix ODS import tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
2022-02-06 14:20:59 +01:00
Kamil Tekiela
47a039d70c Implement ResultInterface & MysqliResult
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-31 23:59:24 +00: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
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
Maurício Meneghini Fauth
3e0856c77b
Remove useless string concatenations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 21:40:22 -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
fa88ce2f00
Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-10 15:39:23 +02:00
William Desportes
9249951f51
Fix test after #17014
Pull-request: #17064
Ref: #17014

This commit is the proof that the PR was right and that it works

Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-10 14:48:55 +02:00
William Desportes
0f05c686e4
Add tests for #17014
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-10 14:44:47 +02:00
William Desportes
587536b766
Remove non used variables
Running: composer run psalm -- --alter --issues=UnusedVariable
And removing the false positives I reported upstream

Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-16 02:13:27 +02:00
Maurício Meneghini Fauth
e8c28d1883
Remove some globals from Config::enableBc method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-08 19:49:26 -03:00
Maurício Meneghini Fauth
8319f88ecf
Fix some errors found by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-22 17:12:02 -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
1c084de30b
Fix coding standard errors
Related to 62f142c9fa.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-03 16:50:33 -03:00
Maurício Meneghini Fauth
704154572b
Fix coding standard error
[ci skip]

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-28 18:57:18 -03:00
William Desportes
f5f636ef3b
Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-05-28 21:43:28 +02:00
William Desportes
790c09084c
Add tests for #16920 - Uncaught TypeError: PhpMyAdmin\Import::detectType(): Argument #2 ($cell) must be of type ?string, float given
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-05-28 21:36:39 +02:00
Maurício Meneghini Fauth
669a60c8ae
Merge branch 'QA_5_1'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-25 22:17:13 -03:00
Utkarsh Gupta
c309b96edd Skip testImportOsm and testDoImport on 32-bit/s390x arch
These two tests fail on s390x machines, looks like some
32-bit issues we already have. Probably worth skipping
these on 32-bit/s390x arch.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
2021-05-24 19:44:59 +05:30
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
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
578d70e9de Remove import_handle global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-18 20:45:33 -03:00
William Desportes
de0426aa48
Add some typehints on tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-07-18 00:01:57 +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
William Desportes
a300a25319
Replace assertEquals({false,true} by assert{false,true}
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-26 13:13:15 +02: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
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
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
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
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
c1c8e09586
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 23:45:16 +01:00
bepsvpt
879b7fe681
fix #14875 - fix shp filename sanitization and update test
Co-authored-by: bepsvpt <og7lsrszah6y3lz@infinitefa.email>

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-06 23:00:55 +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
77518d341e Remove unused use statements
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-11 21:20:58 -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
Maurício Meneghini Fauth
7be0f6bfae Reference class names in use statements
Sort use statements

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-12 00:14:26 -03:00
Maurício Meneghini Fauth
be936acd3b Add ChangeLog entry for #13424
Fix coding standard errors

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-03-25 17:14:44 -03:00
amarjitsingh52922
dd88475656 Fix for #13424 Importing a CSV created tables named Table ##" (#14935)
Fix #13424 Importing a CSV created tables named "Table ##"

Signed-off-by: Amarjit Singh <amarjitsingh52922@gmail.com>
2019-03-25 16:49:16 -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