aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2022-10-20Add tests on i18n classes (#4756)Gravatar Alexis Degrugillier
2022-10-18Fix i18n tool when adding parent translation (#4742)Gravatar Alexis Degrugillier
See #4737
2022-08-18Easier full-text search possibility (#4505)Gravatar Alexandre Alapetite
* Easier full-text search possibility Contributes to https://github.com/FreshRSS/FreshRSS/issues/1331 Avoid concats in searches to make text indexes easier to build * Fix tests * Documentation
2022-08-16Basic support for negative searches with parentheses (#4503)Gravatar Alexandre Alapetite
* Basic support for negative searches with parentheses * `!((author:Alice intitle:hello) OR (author:Bob intitle:world))` * `(author:Alice intitle:hello) !(author:Bob intitle:world)` * `!(S:1 OR S:2)` * Minor documentation / comment * Remove syslog debug line
2022-06-02New search engine (#4378)Gravatar Alexandre Alapetite
* New possibility to invoke user queries from a search expression From the search field: `S:"My query"`. Can be combined with other filters such as `S:"My query" date:P3d` as long as the user queries do not contain `OR`. A use-case is to have an RSS filter with a stable address or an external API call with the ability to update the user query. * Draft of parenthesis logic * More draft * Working parenthesis (a OR b) (c OR d) * Working (A) OR (B) * Support nested parentheses + unit tests + documentation * search:MySearch and S:3
2022-05-16Allow CssXPath updates with composer (#4368)Gravatar Artur Weigandt
* Install CssXPath with composer * Fix code style in tests * fix pathnames for tests and linting * add irrelevant files to .gitignore * Alphabetic order * let composer sort the packages alphabetically Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-05-14Update to PHPMailer 6.6.0 with composer (#4329)Gravatar Artur Weigandt
* Install PHPMailer 6.5.1 with composer * Fix folder name for phpmailer * Update PHPMailer to v6.6.0, add LICENSE and README.md * remove composer and autoload.php after install/update * Fix path to PHPMailer for PHPStan * Remove lib/composer.lock, lock PHPMailer at version 6.6.0 * Improve PSR-4 autoloading for PHPMailer * Markdownlint ignore * Delete some obvious comments * ignores * Support composer update --no-autoloader * Automatic cleaning With rules based on https://github.com/PHPMailer/PHPMailer/blob/master/README.md#minimal-installation * Readme gitignore hint Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-03-21Fix some search expressions (#4277)Gravatar Alexandre Alapetite
* Fix some search expressions * Fix decoding bug when using quotes to search free text containing some spaces such as `"ab cd"` * Fix use of `-` wrongly triggering a negative search in e.g. `ab-cd` * Fix edge cases * A couple of tests
2022-01-29Clean temp files MigratorTest (#4177)Gravatar Alexandre Alapetite
The automated tests used to generate several temporary files not deleted...
2022-01-17fix: Ignore non-PHP files in migrations/ folder (#4163)Gravatar berumuron
Some NAS create folders named `@eaDir` in the FreshRSS tree, including the `migrations/` folder. This broke the migration system which expected only valid PHP files to be present in this folder. Now, it ignores non-PHP files. Reference: https://github.com/FreshRSS/FreshRSS/issues/4044
2022-01-08Fix various typos and spelling errors in documentation, comments and code. ↵Gravatar Thomas Renes
(#4134)
2021-05-15git update auto change to edge branch (#3589)Gravatar Alexandre Alapetite
* git update auto change to edge branch For existing installations using automatic git update, checkout *edge* branch if it was still using *master* or *dev*. * One more prune * Fix several small issues * theirs does not work here * Use migration mechanism * Better handling of Migration errors * Test details * Fix tests * Do not use new migration system for now
2021-02-28Travis: Enforce phpcs line length + whitespace (#3488)Gravatar Alexandre Alapetite
* Update Travis line length * Also check whitespace in CSS files * Fix line length ext.php * More syntax, string templates * Fix exclude-pattern * Test JS files as well
2021-02-27Remove + conversion in search except for tags (#3489)Gravatar Alexis Degrugillier
Before, every + sign was converted to a space to allow to search for spaces. But the documentation stated that to search for space one has to enclose the string in quotes. This has a confusing behavior when searching for a string containing a + sign. Now, the + conversion is kept only for the tag search since it's the only one documented that way. See #3454
2021-02-20Update Travis.yaml to support newer PHP versions (#3459)Gravatar Brooke
* Update Travis * Drop Older PHP Versions Drops PHP 7.1 and 7.3 from tests. Also updates Translations to use PHP 7.4 instead of 7.3 * Update Test Class Names to Fix Warnings This updates the Class name for 'CategoryTest', `passwordUtilTest.php`, and `MigratorTest.php`
2020-07-08Add a migration system (#2760)Gravatar Marien Fressinaud
* Add a Minz_Migrator class Until now, we updated the database structure somewhere in the code but it wasn't always consistent and somehow complicated to find. Also, this code was always checked for nothing. The Migrator aims to improve and ease the creation of migrations. It should improve the way we apply the updates, making the update server almost useless. References: - example of migration (before Migrator): https://github.com/FreshRSS/FreshRSS/commit/cc0db9af4f980829faa4bf0960617807b32fb4fa#diff-11a53443fa81512b128c66b065df0679R10 - update server: https://github.com/FreshRSS/update.freshrss.org - PR moving the code of the update server to the core: https://github.com/FreshRSS/FreshRSS/pull/1760 * Automatically apply migrations For now, administrators are used to have nothing to do during an update else than getting the new code. I suggest to keep this behaviour and automatically apply migrations if we detect new ones. Another solution would be to create a CLI command and ask admins to call it after getting the new code. It could hide migrations errors to end users, but admin can forget to apply migrations since there are not used to it. * Add documentation for Minz Migrator * Execute migrations even if next ones are applied * Change mechanism to prevent multiple update at once * Use mkdir to create the lock and to test it exists Reference: https://stackoverflow.com/a/731634 * Append .lock to applied_migrations_path There are no needs to define another file to serve as a lock. * Change migrations naming convention * Apply suggestions from code review Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr> * Perform a low-cost migration versions comparaison * Clarify version numbers concerning the migration system Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-04-01gitignore phpunit.phar (#2868)Gravatar Alexandre Alapetite
Used for tests Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2844
2020-03-08Improve login and registration pages (#2794)Gravatar Marien Fressinaud
* Keep the user on login page on failure * Show an error if username already exists * Check the password format in the backend * Return a better message if username is invalid * Add a title to the login page * wip: Improve look of login and register pages * Set a capital M in username help message On the registration page, username tip started with a minuscule, while the password tip started with a capital. * Change message if username is taken
2019-12-23tec: Fix test suite (#2721)Gravatar Marien Fressinaud
* Rework the travis file to enable PHPUnit I realized that unit tests weren't executed on Travis. While working on this file to enable these tests, I started to think we could simplify it. I separated jobs so: - PHP linter and tests are only performed on PHP 7.3 - Translations are tested separatly so they can fail (it was already the case but it was hard to understand the way it was done) - PHP 5.6 only checks syntax issues - the last job checks css, js, etc. (it didn't change) PHPUnit is not executed on 5.6 because only the version 5 is available while the latest version is the 8 (https://phpunit.de/supported-versions.html). I think it's easier to read (each job is more explicit) but I'm not a Travis expert so maybe there's some room for improvements. * Fix failing tests The category `_name` regression was introduced in commit b323ed084. I wasn't able to understand when and why Search tests was wrong. The rest is about upgrade of PHPUnit.
2019-07-24tests: add shellchecks and shfmt to README (#2458)Gravatar Frans de Jonge
See https://github.com/FreshRSS/FreshRSS/pull/2454#discussion_r306174996
2019-07-22[CI] Run shellcheck and shfmt (#2454)Gravatar Frans de Jonge
* [CI] Run shellcheck and shfmt Cf. https://github.com/FreshRSS/FreshRSS/pull/2436#discussion_r305640019 * rename * no need for disable anymore * also remove leftover indentation flags even if it makes no difference to syntax checking * define colors and reset before exit for local use
2017-12-21Minor changes (#1747)Gravatar Nicola Spanti
2017-12-11Use __DIR__ for relative include and requireGravatar Alexandre Alapetite
For uniformity, and to avoid having PHP searching in include_path. http://php.net/manual/function.include.php https://github.com/FreshRSS/FreshRSS/pull/1715 https://github.com/FreshRSS/FreshRSS/pull/1711#issuecomment-350581350
2017-09-22[ci] Add Travis (#1619)Gravatar Frans de Jonge
* [ci] Add Travis * Exclude some libs * Semi-auto whitespace fixes * line length in SQLite * Exclude tests from line length * Feed.php line length * Feed.php: get rid of unnecessary concat * Feed.php: line length * bootstrap.php: no newline at end of file * Allow concatenating across multiple lines * Add Travis badge * do-install line length * update-or-create-user line length * cli/create-user line length * tests/app/Models/SearchTest.php fix indentation * tests/app/Models/UserQueryTest.php fix indentation * tests/app/Models/CategoryTest.php fix indentation * [fix] PHP 5.3 on precise * cli/do-install no spaces * cli/list-users line length * cli/reconfigure line length * empty catch statements * api/index line length nonsense * spaces before semicolon * app/Models/EntryDAO bunch of indentation * extra blank lines * spaces before comma in function call * testing tabwidth * increase to 10 * comment out tabwidth line * try older phpcs version 3.0.0RC4 * line length exception for app/install.php * proper spaces * stray spaces in i18n * Minz/ModelPdo line length * Minz whitespace * greader line length * greader elseif placement * app/Models/Feed.php spacing in function argument * ignore php 5.3 * app/Models/ConfigurationSetter.php stray whitespace * EntryDAOSQLite line length * I vote for higher max line length =P * ignore SQL * remove classname complaint * line length/more legible SQL * ignore line length nonsense * greader line length * feedController issues * uppercase TRUE, FALSE, NULL * revert * importExportController lowercase null * Share.php default value not necessary because ! is_array () a few lines down * CategoryDAO constants should be UPPERCASE * EntryDAO reduce line length * contentious autofix * Allow failures on all versions of PHP except 7.1 because reasons
2017-04-01Improve search: intitle, author, inurlGravatar Alexandre Alapetite
Allow multiple values of intitle: , author:, inurl: Note: Tests for UserQueryTest are broken due to https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-4.0.0#backwards-compatibility-issues
2015-04-22Split the search into valuesGravatar Alexis Degrugillier
Before, the search was a single value. Now it is splited in chuncks when separated by spaces. Except if they are enclosed by single quotes or double quotes. For some reasons, the unit tests are working for both single and double quotes but the search box isn't. It is working only with single quotes. We need to investigate the reason of this behavior. See #823
2015-03-05Fix DAO exceptionGravatar Alexis Degrugillier
Change the name and messages
2015-03-05Introduce user queries objectsGravatar Alexis Degrugillier
There is now an object to manipulate user queries. It allows to move logic to handle those from the view and the controller in the model. Thus making the view and the controller easier to read. I introduced a new interface to start using dependency injection. There is still some rough edges but we are moving in the right direction. The new object is fully tested but it still need some improvements, for instance, it is still tied to the search object. There might be a better way to do that.
2015-02-21Add search default raw valueGravatar Alexis Degrugillier
Before, the default value was undefined. Now it always has a value even when no value is provided.
2015-02-12Add a test to verify if the search input is stored correctlyGravatar Alexis Degrugillier
2015-02-11Extract the search code from the contextGravatar Alexis Degrugillier
I figured that the code for the search could be extracted from the context to have separation of concern. It supports multiple keywords. It suports also multiple tag keywords.
2015-02-08Add a way to parse search string to extract keywordsGravatar Alexis Degrugillier
This feature is not in use at the moment, but it will be handy to reorganize the query building process. It allows to have more than one keyword in the search box. Full tests are available as well. It probably needs a refactoring later, but I think this is the first step to make the application full object oriented and testable.
2015-01-17Add the first unit testGravatar Alexis Degrugillier
Add phpunit configuration to run tests and add the first running test to validate the configuration