aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/utils
Commit message (Collapse)AuthorAgeFilesLines
* namespacing: \Shaarli\HistoryVirtualTam2019-01-121-0/+2
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* lint: apply phpcbf to tests/VirtualTam2018-12-022-4/+4
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Add a button to set links as stickyArthurHoaro2018-10-061-2/+43
| | | | | | Meaning that they always appear on top of all links Fixes #186
* Thumbnails: add a common mode to only retrieve thumbs from popular media ↵ArthurHoaro2018-07-051-1/+1
| | | | websites
* Add a page to update all thumbnails through AJAX requests in both templatesArthurHoaro2018-07-051-6/+6
|
* Update thumbnail integration after rebasing the branchArthurHoaro2018-07-052-12/+70
|
* Use web-thumbnailer to retrieve thumbnailsArthurHoaro2018-07-051-0/+3
| | | | | | | | | | * requires PHP 5.6 * use blazy on linklist since a lot more thumbs are retrieved * thumbnails can be disabled * thumbs size is now 120x120 * thumbs are now cropped to fit the expected size Fixes #345 #425 #487 #543 #588 #590
* Add test coverage for LoginManager methodsVirtualTam2018-06-021-0/+12
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Load theme translations files automaticallyArthurHoaro2018-03-262-0/+16
| | | | | | Fixes #1077 Take a look at the docs update to see how it works
* Refactor login / ban authentication stepsVirtualTam2018-02-051-1/+34
| | | | | | | | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/issues/324 Added: - Add the `LoginManager` class to manage logins and bans Changed: - Refactor IP ban management - Simplify logic - Avoid using globals, inject dependencies Fixed: - Use `ban_duration` instead of `ban_after` when setting a new ban Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Fix warnings when upgrading from legacy SebSauvage versionArthurHoaro2018-01-251-0/+1
| | | | Fixes #1040
* Improve SessionManager constructor and testsVirtualTam2017-11-081-0/+12
| | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/pull/1005 Changed: - pass a copy of the ConfigManager instance instead of a reference - move FakeConfigManager to a dedicated file - update tests Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Merge pull request #962 from ArthurHoaro/feature/perfs2ArthurHoaro2017-10-281-0/+23
|\ | | | | Performances: reorder links when they're written instead of read
| * Performances: reorder links when they're written instead of readArthurHoaro2017-09-021-0/+23
| | | | | | | | relates to #891
* | Shaarli's translationArthurHoaro2017-10-222-0/+19
|/ | | | | | | | | * translation system and unit tests * Translations everywhere Dont use translation merge It is not available with PHP builtin gettext, so it would have lead to inconsistency.
* Merge pull request #841 from ArthurHoaro/feature/search-no-tagArthurHoaro2017-05-251-1/+25
|\ | | | | Empty tag search will look for not tagged links
| * Empty tag search will look for not tagged linksArthurHoaro2017-05-251-1/+25
| | | | | | | | | | | | | | | | | | | | | | Fixes #784 From now, searching for tags with an empty value will return only not tagged links, with the search bar showing `x results [not tagged]`. Note that using the api, the searchtags request parameter must be set to `false` to get the same result. - [ ] Update API doc
* | History: fix entries orderArthurHoaro2017-05-071-11/+11
| |
* | API: Get History endpointArthurHoaro2017-05-071-0/+82
| | | | | | | | See http://shaarli.github.io/api-documentation/#links-history-get
* | REST API: implement POST link serviceArthurHoaro2017-03-271-1/+1
|/
* Link imports are now logged in `data/` folder, and can be debug using ↵ArthurHoaro2017-03-101-1/+1
| | | | | | `dev.debug=true` setting related to #741 and #681
* Minor improvements regarding #705 (coding style, unit tests, etc.)ArthurHoaro2017-01-051-1/+2
|
* Add a persistent 'shorturl' key to all linksArthurHoaro2016-12-121-10/+10
| | | | | | | All existing link will keep their permalinks. New links will have smallhash generated with date+id. The purpose of this is to avoid collision between links due to their creation date.
* Unit Test for the new ID systemArthurHoaro2016-12-121-14/+47
|
* LinkDB: explicit method visibilityVirtualTam2016-10-201-1/+1
| | | | | | Relates to https://github.com/shaarli/Shaarli/issues/95 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Merge pull request #622 from ArthurHoaro/update-dateArthur2016-10-121-2/+4
|\ | | | | Save link update dates and render it in templates and feeds
| * Set updated date for items in feedsArthurHoaro2016-08-031-2/+4
| | | | | | | | | | RSS doesn't support updated date for items, so we use the ATOM extension. Updated dates also bump the global update
* | Fix: add missing final newlines, untabify textVirtualTam2016-08-131-1/+1
|/ | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Better whitespace handling in tagsArthurHoaro2016-08-021-1/+1
| | | | | | Correct PR #573 to work properly with hidden tags, and add ReferenceLinkDB UT. Fixes #571 - Closes #573
* Merge pull request #558 from ArthurHoaro/hashtag4Arthur2016-07-091-7/+7
|\ | | | | Hashtag system
| * Hashtag systemArthurHoaro2016-06-061-7/+7
| | | | | | | | | | | | * Hashtag are auto-linked with a filter search * Supports unicode * Compatible with markdown (excluded in code blocks)
* | Merge pull request #570 from ArthurHoaro/config-managerArthur2016-07-093-0/+53
|\ \ | |/ |/| Introduce a configuration manager
| * Add closing PHP tags to JSON config filesArthurHoaro2016-06-202-0/+3
| |
| * Rename configuration key for better sectionsArthurHoaro2016-06-111-4/+6
| |
| * Rename configuration keys and fix GLOBALS in templatesArthurHoaro2016-06-113-30/+22
| |
| * Adds ConfigJson which handle the configuration in JSON format.ArthurHoaro2016-06-113-0/+27
| | | | | | | | Also use the Updater to make the transition
| * Replace $GLOBALS configuration with the configuration manager in the whole ↵ArthurHoaro2016-06-112-0/+29
| | | | | | | | code base
* | Fixes #497: ignore case difference between tagsArthurHoaro2016-05-311-1/+1
|/ | | | | | | | While retrieving all tags, case differences will be ignored. This affects: * tag cloud * tag autocompletion
* FeedBuilder unit testsArthurHoaro2016-03-251-9/+11
|
* Support text search across link fields.ArthurHoaro2016-02-151-4/+4
|
* Improved search: combine AND, exact terms and exclude search.ArthurHoaro2016-02-151-1/+10
|
* Private/Hidden tagsArthurHoaro2016-02-151-1/+1
| | | | | | | Tags starting with a dot '.' are now private. They can only be seen and searched when logged in. Fixes #315
* Add exclusion in tag searchArthurHoaro2016-02-151-1/+1
| | | | | | | | | | | * Searching '-mytag' will now exlude all shaares with 'mytag' tag. * All tags starting with a '-' are renamed without it (through the Updater). * Unit tests. Minor code changes: * LinkDB->filter() can now take no parameters (get all link depending on logged status). * tagsStrToArray() is now static and filters blank tags.
* Link filter refactoringArthurHoaro2016-01-061-0/+5
| | | | | | | | | | * introduce class LinkFilter to handle link filter operation (and lighten LinkDB). * handle 'private only' in filtering. * update template to prefill search fields with current search terms. * coding style. * unit test (mostly move from LinkDB to LinkFilter). PS: preparation for #358 #315 and 'AND' search.
* Session ID: extend the regex to match possible hash representationsVirtualTam2015-09-061-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves #306 Relates to #335 & #336 Duplicated by #339 Issues: - PHP regenerates the session ID if it is not compliant - the regex checking the session ID does not cover all cases - different algorithms: md5, sha1, sha256, etc. - bit representations: 4, 5, 6 Fix: - `index.php`: - remove `uniqid()` usage - call `session_regenerate_id()` if an invalid cookie is detected - regex: support all possible characters - '[a-zA-Z,-]{2,128}' - tests: add coverage for all algorithms & bit representations See: - http://php.net/manual/en/session.configuration.php#ini.session.hash-function - https://secure.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character - http://php.net/manual/en/function.session-id.php - http://php.net/manual/en/function.session-regenerate-id.php - http://php.net/manual/en/function.hash-algos.php Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* CachedPage: move to a proper file, add testsVirtualTam2015-08-131-1/+0
| | | | | | | | | | | | Modifications - rename `pageCache` to `CachedPage` - move utilities to `Cache` - do not access globals - apply coding rules - update LinkDB and test code - add test coverage Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* LinkDB: prefix private members with an underscoreVirtualTam2015-07-091-10/+10
| | | | | | Relates to #95, #218 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* LinkDB: do not access global variablesVirtualTam2015-06-241-2/+2
| | | | | | | | | | | Relates to #218 Removes "hidden" access to the following variables: - $GLOBALS['config']['datastore'] - PHPPREFIX - PHPSUFFIX Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* LinkDB: move to a proper file, add test coverageVirtualTam2015-06-111-0/+128
Relates to #71 LinkDB - move to application/LinkDB.php - code cleanup - indentation - whitespaces - formatting - comment cleanup - add missing documentation - unify formatting Test coverage for LinkDB - constructor - public / private access - link-related methods Shaarli utilities (LinkDB dependencies) - move startsWith() and endsWith() functions to application/Utils.php - add test coverage Dev utilities - Composer: add PHPUnit to dev dependencies - Makefile: - update lint targets - add test targets - generate coverage reports Signed-off-by: VirtualTam <virtualtam@flibidi.net>