Commit Graph

47 Commits

Author SHA1 Message Date
Kamil Tekiela
15915a45e0 Send DBI to SqlQueryForm using DI
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-02 15:15:58 +00: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
bf49480160
Populate relation Session with RelationParameters class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-17 12:09:15 -03:00
Maurício Meneghini Fauth
c4575fd48b
Add methods to check for RelationParameters features
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-11 08:10:40 -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
Sergio Gutierrez
c60b786915
Ref #13270 - fix(query.twig): Inline events removed (#16905)
* fix(query.twig): Inline events removed

Signed-off-by: Sergio Gutierrez <sergiogutierrez0611@gmail.com>

* fix(SqlQueryFormTest.php): Enable auto select text in text area assertion test fixed

Signed-off-by: Sergio Gutierrez <sergiogutierrez0611@gmail.com>
2021-08-11 12:04:44 -03:00
William Desportes
be4a577170
Fix failing SqlQueryFormTest
"Undefined index: trackingwork"
Seed: 1626183404

Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-13 15:42:00 +02:00
William Desportes
f9f4ea4261
Remove mock DBI from SqlQueryFormTest
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-12 00:34:56 +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
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
674bf8f97c
Remove db, table and dbi globals from Tracking class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-26 16:40:05 -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
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
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
Maurício Meneghini Fauth
9269d75fb4 Fix some coding standard issues
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-25 20:22:18 -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
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
8ef5143901
Use AbstractTestCase on all unit tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-20 21:15:06 +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
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
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
Hugues Peccatte
3255e4ad7b Split Util class regarding the responsabilities (#15567)
PhpMyAdmin\Util is a very huge class with a lot of responsabilities.

There is a lot of work to split it, but this may be just a small start, waiting for a more normalized code.

* Split Util class regarding the responsabilities
* Split the buttonOrImage function

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-11-21 20:20:05 -03:00
Maurício Meneghini Fauth
e3f891f604 Refactor SqlQueryForm::getHtml
Move insert and page templates into page template

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-09-03 20:41:36 -03:00
Maurício Meneghini Fauth
53ce1d256c Extract HTML from SqlQueryForm::getHtml
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-09-02 22:19:29 -03:00
Maurício Meneghini Fauth
732236c137 Extract HTML from SqlQueryForm::getHtmlForInsert
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-09-02 21:28:58 -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
208b0e25e1 Use the router for the sql pages
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-08-03 21:25:27 -03:00
Maurício Meneghini Fauth
0b3014207d Use camel case for most of the js/functions.js variables
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-27 00:55:10 -03:00
Maurício Meneghini Fauth
ce71901de5 Refactor js/functions.js to use a module
Adds Functions module in js/functions.js to reduce the number of global variables.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-22 17:44:21 -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
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
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
d0c1876552 Refactor PhpMyAdmin\SqlQueryForm static methods
Replaces static methods with instance methods.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-04 17:34:16 -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
56fe75d730 Refactor sql_query_form functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-13 19:09:59 -03:00