summaryrefslogtreecommitdiffstats
path: root/tests/Components
Commit message (Collapse)AuthorAgeFilesLines
* Remove left overs of old array syntaxWilliam Desportes2019-12-311-2/+2
| | | | Signed-off-by: William Desportes <williamdes@wdes.fr>
* Add PHPStan at level 2Maurício Meneghini Fauth2019-12-162-1/+7
| | | | Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
* Remove useless comments and annotationsMaurício Meneghini Fauth2019-12-144-8/+8
| | | | Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
* Reference classes via a use statementMaurício Meneghini Fauth2019-12-141-2/+3
| | | | Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
* Merge branch 'QA'William Desportes2019-11-011-0/+12
|\ | | | | | | Signed-off-by: William Desportes <williamdes@wdes.fr>
| * Add test case to check partition name starting by a numberHugues Peccatte2019-11-011-0/+12
| | | | | | | | Signed-off-by: Hugues Peccatte <hugues.peccatte@aareon.fr>
* | Merge branch 'QA'William Desportes2019-10-291-0/+16
|\ \ | |/ | | | | | | | | This merge includes phpcs fixes Signed-off-by: William Desportes <williamdes@wdes.fr>
| * Manage "CHECK" keywordHugues Peccatte2019-10-281-0/+16
| | | | | | | | | | | | | | Even if this keyword is ignored by MySQL, it should be parsed. Ref: #167 Signed-off-by: Hugues Peccatte <hugues.peccatte@aareon.fr>
| * revert usage of new array syntax []William Desportes2019-05-292-4/+4
| | | | | | | | | | | | See: 86c5baebda24c1721fb6881df8671a3c7df60e8b Related-to: 930a860bc7f0684c45babd012070f88a9505d427, 5d5089a259d0195c4a1e4aa3588c31c839954067 Signed-off-by: William Desportes <williamdes@wdes.fr>
| * Revert "Enable strict mode on PHP files"William Desportes2019-05-2821-21/+0
| | | | | | | | | | This reverts commit 17da8a34b81442524a8e01fead7b5968fa1cc39d. Signed-off-by: William Desportes <williamdes@wdes.fr>
| * revert of new array syntaxWilliam Desportes2019-05-2812-88/+88
| | | | | | | | | | See: 86c5baebda24c1721fb6881df8671a3c7df60e8b Signed-off-by: William Desportes <williamdes@wdes.fr>
* | Fix deprecated annotations William Desportes2019-09-251-6/+4
|/ | | | | | Ref: #261 Signed-off-by: William Desportes <williamdes@wdes.fr>
* Fix errors detected by PHPStan at level 0Maurício Meneghini Fauth2019-05-081-1/+1
| | | | Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
* Fix PHP warnings when building an incomplete CASE expressionThomas Gerbet2019-04-101-0/+6
| | | | | | | | | Issue can be reproduced with the following code snippet: ```php new \PhpMyAdmin\SqlParser\Parser('SELECT a CASE'); // PHP Warning: count(): Parameter must be an array or an object that implements Countable in src/Components/CaseExpression.php on line 296 // PHP Warning: count(): Parameter must be an array or an object that implements Countable in src/Components/CaseExpression.php on line 297 ```
* Fix risky testsMaurício Meneghini Fauth2019-01-165-9/+16
| | | | | | | - Rename test providers - Mark tests as incomplete Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
* Enable strict mode on PHP filesMaurício Meneghini Fauth2019-01-1621-0/+21
| | | | Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
* Apply phpmyadmin/coding-standardMaurício Meneghini Fauth2019-01-1613-83/+108
| | | | Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
* Merge pull request #203 from mostertb/case-aliasIsaac Bennetch2018-12-241-0/+28
|\ | | | | Add support for Aliases on CASE expressions
| * Add component build tests from CASE expressions with aliasesBrad Mostert2018-10-131-0/+28
| |
* | Add support for LOCK and UNLOCK StatementsDeven Bansod2018-12-221-0/+71
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Cleanup and improve readability:Bruno Perel2018-11-262-2/+1
|/ | | | | Avoid duplicate if conditions Use switch/case instead of ifs when possible
* Refactoring testsGabriel Caruso2017-12-145-16/+16
|
* Add tests for (partially) parsed queriesMichal Čihař2017-07-122-0/+2
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Remove not used type arg from GROUP BYMichal Čihař2017-06-011-3/+3
| | | | | | | | It should not be there since beginning. Issue #154 Signed-off-by: Michal Čihař <michal@cihar.com>
* Add GroupKeyword class to fix postgres GROUP BYJosé Tobias de Freitas Neto2017-05-311-0/+24
|
* Merge remote-tracking branch 'origin/pull/137'Michal Čihař2017-02-143-0/+7
|\
| * Apply cs fixesDamian Dlugosz2017-02-123-0/+4
| |
* | Order importsDamian Dlugosz2017-02-1217-17/+17
|/
* Added PhpMyAdmin namespace prefix to follow PSR-4.Michal Čihař2017-01-2319-79/+79
| | | | | | Fixes #126 Signed-off-by: Michal Čihař <michal@cihar.com>
* Apply php-cs-fixerDamian Dlugosz2017-01-0619-45/+6
|
* Add some missing assertionsMichal Čihař2017-01-031-3/+31
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Add tests for removal of option which has value attached to itDeven Bansod2016-10-251-0/+15
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Merge pull request #90 from devenbansod/subquery_in_fromMichal Čihař2016-10-031-0/+6
|\ | | | | Fix parsing of subquery in FROM clause
| * Fix parsing and building of SELECT ... INTO @var1 [,@var2...]Deven Bansod2016-09-281-0/+6
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Merge pull request #87 from devenbansod/delete_statementMichal Čihař2016-10-031-2/+2
|\ \ | | | | | | Implement parsing and building for Delete Statement
| * | Fixed some errors and add new testsDeven Bansod2016-09-271-1/+1
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * | Added test cases for parsing DELETE statementsDeven Bansod2016-09-241-1/+1
| |/ | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Add more testsDeven Bansod2016-09-261-0/+52
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Fix some issue with error reports and added testcasesDeven Bansod2016-09-261-0/+36
|/ | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Fix test failures, add test case assertionsDeven Bansod2016-09-101-2/+2
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Move test to better placeMichal Čihař2016-03-211-11/+0
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Properly parse CREATE TABLE [AS] SELECTMichal Čihař2016-03-191-0/+11
| | | | | | Fixes https://github.com/phpmyadmin/phpmyadmin/issues/12109 Signed-off-by: Michal Čihař <michal@cihar.com>
* Misc: Fixed coding style issues.Dan Ungureanu2016-02-211-0/+0
| | | | Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
* JoinKeyword: Added tests.Dan Ungureanu2016-02-211-0/+10
| | | | Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
* Expression: Improved error messages related to aliases.Dan Ungureanu2016-02-211-2/+2
| | | | Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
* Expression: Refactored parsing options.v3.3.0Dan Ungureanu2016-02-123-4/+4
|
* ArrayObj: Handle more complex expressions in arrays.Dan Ungureanu2016-02-021-1/+0
|
* Improved test coverage.Dan Ungureanu2015-11-081-0/+2
|
* Support for references from different tables.v3.0.0Dan Ungureanu2015-10-031-2/+3
|
* Updated coding style to follow PSR-2 coding standards.Dan Ungureanu2015-09-251-1/+0
|
* Replaced explicit calls to Component::build() with implicit calls to ↵Dan Ungureanu2015-08-182-3/+9
| | | | | | | Component::__toString(). Fixed bugs that caused field names like '0', '0.0', etc. to be considered invalid. Refactoring.
* Fixed a couple of minor bugs in partition parsing.Dan Ungureanu2015-08-162-0/+41
| | | | | | | 'MAXVALUE' can be used for partitions. The correct class is used for parsing. Options may be specified for the class that is used for parsing. Wrote tests.
* Finished builders for components.Dan Ungureanu2015-08-143-0/+39
|
* Refactored field to something more appropriate depending on the context in ↵Dan Ungureanu2015-08-081-6/+6
| | | | which it is used.
* Translated exceptions.Dan Ungureanu2015-07-251-0/+2
| | | | Refactored tests.
* Added builder for ORDER keyword.Dan Ungureanu2015-07-251-0/+26
|
* Reorganized tests.Dan Ungureanu2015-07-232-5/+5
| | | | Implemented a tool to generate tests.
* Implemented support for transactions.Dan Ungureanu2015-07-231-4/+15
|
* Avoid processing the alias twice and generate an error.Dan Ungureanu2015-07-192-8/+42
| | | | | Errors are triggered when an unexpected token is found between clauses. Refactoring.
* Better error detection. Fixed some of the old messages.Dan Ungureanu2015-07-154-6/+55
| | | | Minor coding style fixes.
* Fixed some Scrutinizer issues.Dan Ungureanu2015-07-151-1/+2
|
* Improved error messages.Dan Ungureanu2015-07-156-27/+153
| | | | | Achieved 100% code coverage. Some refactoring.
* Added switch to skip sorting options.Dan Ungureanu2015-07-141-15/+11
| | | | Renamed the keys used for options to something more relevant.
* Added MariaDB's options for virtual fields. Updated contexts to contain ↵Dan Ungureanu2015-07-141-4/+18
| | | | | | | | | relevant keywords. Added magic method '__toString()' for components and statements for building. Fixed a bug that caused the function name to be incorrectly detected in an expression. Fixed a bug that ignored the 'noAlias' option in expressions. Options may be expressions now.
* Added remove() method for OptionsArray.Dan Ungureanu2015-07-101-0/+28
| | | | | Fixed undefined variables introduced by previous renaming. Some refactoring.
* Imporved JOIN parsing and building.Dan Ungureanu2015-07-101-0/+36
| | | | Some keywords may appear in conditions.
* Mass renaming. Using 'component' instead of 'fragment'.Dan Ungureanu2015-07-1010-0/+332