Commit Graph

48 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
3f2c53ef1d
Replace PHPUnit annotations with attributes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-07 11:44:01 -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
d0d90551c3 Remove the dblist global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-13 21:08:00 -03:00
Maurício Meneghini Fauth
5a34a3bb04
Remove db and table properties from controllers
Replaces them with their respective globals.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-02-02 14:48:43 -03: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
aaee7961c1
Remove Template dependency from Relation class
Related to 2299a62e49.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-17 12:09:14 -03:00
Maurício Meneghini Fauth
c411121fd8
Move Relation classes into the ConfigStorage namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-17 12:09:13 -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
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
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
William Desportes
50e900a1bf
Remove all @test annotations
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-11-08 23:01:26 +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
601ed4649e Remove DBI dep from Table\AbstractController
Moves the DatabaseInterface class dependency to the classes that use it.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-12 12:53:03 -03:00
Petr Duda
1086b2a6ee Fix #12961 Indexes shown at both tbl_structure and tbl_relation
Signed-off-by: Petr Duda <petrduda@seznam.cz>
2020-09-13 19:31:59 +02: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
Rosheen Naeem
673c194b01 Fixed underscore prefixes
Signed-off-by: Rosheen Naeem <rosheennaeem4@gmail.com>
2020-08-06 17:51:34 +05: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
2d02a15de3 Add static to closures that don't use $this
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 18:30:57 -03:00
Maurício Meneghini Fauth
3ae05c785d Use short list syntax and single line arrays
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 03:32:59 -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
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
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
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
af1c859a03 Refactor Table\RelationController controller
Moves the table relation entry point logic to the controller and removes
the entry point file.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-25 01:28:38 -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
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
54667a0085 Remove old DI container in Table\RelationControllerTest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-17 14:43:06 -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
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
Hugues Peccatte
9abd308837 Inject dependencies (#15271)
Inject dependencies instead of building them.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-06-01 15:13:41 -03:00
Hugues Peccatte
380707fbcd Define controllers as services in an external configuration file
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-05-19 01:54:44 +02:00
Maurício Meneghini Fauth
5254ec1b65 Refactor Navigation\NavigationTree
- Extract HTML from renderState() and renderDbSelect()
- Use DI for $dbi instead of global
- Fix tests

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-24 02:25:48 -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
6c29e58ef7 Rename TableRelationController to RelationController
Renames PhpMyAdmin\Controllers\Table\TableRelationController to
PhpMyAdmin\Controllers\Table\RelationController.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-14 15:43:07 -02:00