1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-29 21:24:44 +03:00
Commit Graph

78 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
b2eb6bf4c9 Extract config load and check from Config's constructor
This allows better handling of the user's config loading and validation.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-15 13:20:13 -03:00
Maximilian Krög
b3498a2a5e Simpler PHPUnit 8 compatibility
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2022-11-07 01:57:59 +01:00
Maurício Meneghini Fauth
f54cc49f86 Remove loadContainerBuilder call from AbstractTestCase::setUp method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-29 20:22:31 -03:00
Maurício Meneghini Fauth
361fcc0843 Remove setTheme call from AbstractTestCase::setUp method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-29 19:07:50 -03:00
Maurício Meneghini Fauth
346923e20a Set dbi only when the test needs it
Related to https://github.com/phpmyadmin/phpmyadmin/pull/17637

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-14 02:21:45 -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
8543e0abe5 Load DBI into container only when needed by the test
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-07-11 13:42:22 -03:00
Maurício Meneghini Fauth
4fdd7f6011 Refactor ConfigStorage\RelationTest test class
Inline the dbi and dbiDummy properties.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-17 04:32:18 -03:00
Maurício Meneghini Fauth
6d54ac471a Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-04-23 14:35:34 -03:00
Rodrigo Wanderley de Melo Cardoso
518a37d23f FIXES #17414 - Adjusting export object in PluginExport to export databases with comp… (#17491)
* Adjusting export object in PluginExport to export databases with compress

Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>

* Adjusting dbi in tests and psalm requisites

Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>

* Adjusting dbi in tests and psalm requisites

Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>

* Adjusting dbi in tests and psalm requisites

Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2022-04-23 00:33:41 -03:00
Maurício Meneghini Fauth
a9de979397 Inline dbi creation in some test classes
Creates a new instance of DatabaseInterface class for each test.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-04-18 21:50:18 -03:00
Maurício Meneghini Fauth
aa829af98c Add factory for Dbi in AbstractTestCase class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-04-17 15:22:45 -03:00
Maurício Meneghini Fauth
1438cb211e Replace global keyword with $GLOBALS
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-07 17:31:11 -03:00
Maurício Meneghini Fauth
acff73aa24 Merge pull request #17215 from kamil-tekiela/Psalm-fixes-1
Use array_keys whenever only keys are needed in foreach
2021-12-02 18:42:12 -03:00
Maurício Meneghini Fauth
e936cad542 Add basic test for Table\OperationsController class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-01 11:47:19 -03:00
Kamil Tekiela
488e7cb5bf Use array_keys whenever only keys are needed in foreach
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-11-29 20:37:39 +00:00
Maurício Meneghini Fauth
090d2eece7 Fix some issues found by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-16 15:11:57 -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
806e2740ba Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-27 22:09:55 +02:00
William Desportes
483df1d961 Add $this->dummyDbi->addErrorCode method to be able to test error code behaviors
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-08-27 03:17:18 +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
20e9d5bf39 Improve debug of assertAllQueriesConsumed
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-20 19:29:24 +02:00
William Desportes
3a87667cab Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-20 17:52:16 +02:00
William Desportes
32d0d3f149 Fix a typo
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-20 01:45:14 +02:00
William Desportes
a9cfb1ec88 Implement AbstractTestCase::setResponseIsAjax
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-20 01:30:38 +02:00
Maurício Meneghini Fauth
355f6d9d20 Remove PhpMyAdmin\Config::enableBc method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-09 13:59:04 -03:00
Maurício Meneghini Fauth
9adaa912e1 Rename Response class to ResponseRenderer
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-30 12:35:22 -03:00
William Desportes
0a1f083990 Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-23 20:36:21 +02:00
William Desportes
897f07d50d Implement error management for #16977
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-23 13:18:40 +02:00
William Desportes
575abb7b08 Adjust tests and failing tests for a specific seed
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-17 16:52:09 +02:00
William Desportes
e7c2557f02 Fix Theme::load after #16967
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-16 01:44:21 +02:00
William Desportes
cbe13a75e8 Move code from bootstrap-dist into AbstractTestCase setUp
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-04 02:17:25 +02:00
William Desportes
a29af90d95 Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-05-31 18:18:44 +02:00
William Desportes
6b169b9fdf Make sure tests use the queries they added to the pile
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-05-31 18:12:31 +02:00
William Desportes
919ce3975f Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-05-31 17:19:05 +02:00
William Desportes
815ee5c7f9 Improve DB testing capabilities by replacing the actual system by a filo system
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-05-31 16:02:24 +02:00
William Desportes
f700e56e42 Add tests for #16871
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-29 22:52:35 +02:00
William Desportes
a4bcd1cfc4 Move DBI getForeignKeyConstrains method to controller
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-29 00:19:02 +02:00
Maurício Meneghini Fauth
90778eecf7 Upgrade phpmyadmin/coding-standard to 3.0.0
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-04-19 02:20:46 -03:00
Maurício Meneghini Fauth
59e4dae52a Remove invalid inline doc comments
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-04-18 14:49:28 -03:00
William Desportes
7c2ebb163c Write revision info from a CLI
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-25 21:42:23 +01: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
2c2127b369 Rename PMA_Theme global variable to theme
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-07 15:15:27 -03:00
William Desportes
7bd3ec6b35 Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-06 21:25:54 +01:00
William Desportes
5a45a0d34b Add methods to access and stub the Response class
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-06 19:29:34 +01:00
William Desportes
b43c20191f Add container builder loading methods to the asbtract test case
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-06 17:53:30 +01:00
William Desportes
c2518aa34b Use early exit for setProxySettings in AbstractTestCase
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-06 02:11:10 +01:00