aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api
Commit message (Collapse)AuthorAgeFilesLines
* New plugin hook: ability to add custom filters to Shaarli search engineArthurHoaro2021-02-0411-18/+128
| | | | | | | A new plugin hook has been added: hook_test_filter_search_entry This hook allows to filter out bookmark with custom plugin code when a search is performed. Related to #143
* API: POST/PUT Link - properly parse tags stringArthurHoaro2020-12-292-0/+96
| | | | | | Even though the documentation specify that tags should be passed as an array, tags string is actually allowed. So this adds a proper parsing with configured separator. Related to #1651
* Merge pull request #1616 from dimtion/fix-api-redirectArthurHoaro2020-10-291-4/+4
|\ | | | | API postLink: change relative path to absolute path
| * postLink: change relative path to absolute pathLoïc Carr2020-10-281-4/+4
| |
* | add search highlight unit testsArthurHoaro2020-10-161-1/+1
| |
* | Add mutex on datastore I/O operationsArthurHoaro2020-10-1310-13/+39
| | | | | | | | | | | | To make sure that there is no concurrent operation on the datastore file. Fixes #1132
* | Merge pull request #1525 from ArthurHoaro/feature/rest-api-bookmark-datesArthurHoaro2020-10-131-4/+4
|\ \ | | | | | | REST API: allow override of creation and update dates
| * | REST API: allow override of creation and update datesArthurHoaro2020-08-291-4/+4
| | | | | | | | | | | | | | | | | | | | | Note that if they're not provided, default behaviour will apply: creation and update dates will be autogenerated, and not empty. Fixes #1223
* | | Merge pull request #1575 from ArthurHoaro/feature/php8ArthurHoaro2020-10-0313-19/+19
|\ \ \
| * | | Compatibility with PHPUnit 9ArthurHoaro2020-09-2913-19/+19
| | | |
* | | | Revert unrelated changes and add unit testsArthurHoaro2020-09-301-0/+47
|/ / /
* | | Convert legacy PHPUnit @expected* to new ->expect*ArthurHoaro2020-09-277-56/+56
| | | | | | | | | | | | Converted automatically using https://github.com/ArthurHoaro/convert-legacy-phpunit-expect
* | | Comply with PHPUnit V8: setup/teardown functions must return voidArthurHoaro2020-09-2613-25/+25
|/ /
* | Fix basePath in unit tests reference DBArthurHoaro2020-07-282-2/+2
| |
* | Better support for notes permalinkArthurHoaro2020-07-282-4/+4
|/
* Add and update unit test for the new system (Bookmark + Service)ArthurHoaro2020-01-1813-116/+170
| | | | See #1307
* Run Unit Tests against PHP 7.4ArthurHoaro2020-01-171-1/+1
| | | | | | | | Bump PHPUnit version and fix unit test - Globals are handled differently and are persistent through tests - Tests without assertions are marked as risky: some of them are just meant to check that no error is raised.
* Optimize and cleanup importsVirtualTam2019-01-1313-68/+72
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* API: update test regexes to comply with PCRE2VirtualTam2019-01-131-2/+2
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* namespacing: \Shaarli\Bookmark\LinkDBVirtualTam2019-01-1210-24/+24
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* namespacing: \Shaarli\Http\Base64UrlVirtualTam2019-01-121-1/+1
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* namespacing: \Shaarli\HistoryVirtualTam2019-01-126-30/+30
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* lint: fix line-length warningsVirtualTam2018-12-022-4/+12
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* lint: apply phpcbf to tests/VirtualTam2018-12-026-8/+3
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Add a button to set links as stickyArthurHoaro2018-10-061-9/+12
| | | | | | Meaning that they always appear on top of all links Fixes #186
* GetTagsTest - Update to alpha sort for equal occurencesArthurHoaro2018-07-053-8/+8
|
* Implements Tags endpoints for Shaarli's REST APIArthurHoaro2018-06-0411-0/+711
| | | | | | | | | | | | Endpoints: * List All Tags [GET] * Get a tag [GET] * Update a tag [PUT] * Delete a tag [DELETE] Fixes #904 References shaarli/api-documentation#34
* Drop PHP 5.5 compatibility and upgrade PHPUnit to v5.xArthurHoaro2018-02-021-2/+4
| | | | PHPUnit 4.x contains deprecated PHP functions in PHP 7.2.
* wildcard tag search supportWilli Eggeling2017-08-301-0/+83
| | | | | | | - when searching for tags you can now include '*' as wildcard placeholder - new search reduces overall overhead when filtering for tags - fixed combination with description tag search ('#' prefix) - tests added
* Merge pull request #841 from ArthurHoaro/feature/search-no-tagArthurHoaro2017-05-252-4/+4
|\ | | | | Empty tag search will look for not tagged links
| * Empty tag search will look for not tagged linksArthurHoaro2017-05-252-4/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* | Add history entries for API endpointArthurHoaro2017-05-077-6/+72
| | | | | | | | CHANGED: datetime is now store as an object in history store file
* | API: Get History endpointArthurHoaro2017-05-071-0/+221
| | | | | | | | See http://shaarli.github.io/api-documentation/#links-history-get
* | API: add DELETE endpointArthurHoaro2017-05-071-0/+104
| | | | | | | | | | | | Based on #840 See http://shaarli.github.io/api-documentation/\#links-link-delete
* | REST API: implement PUT methodArthurHoaro2017-05-072-0/+277
| | | | | | | | | | * Related to #609 * Documentation: http://shaarli.github.io/api-documentation/#links-link-put
* | REST API: implement POST link serviceArthurHoaro2017-03-271-0/+193
|/
* application: introduce the Shaarli\Config namespaceVirtualTam2017-03-044-11/+14
| | | | | | | | | | | Namespaces have been introduced with the REST API, and should be generalized to the whole codebase to manage object scope and benefit from autoloading. See: - https://secure.php.net/manual/en/language.namespaces.php - http://www.php-fig.org/psr/psr-4/ Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* REST API: implements getLink by ID serviceArthurHoaro2017-02-192-6/+137
| | | | See http://shaarli.github.io/api-documentation/#links-link-get
* REST API - getLinks: support the visibility parameterArthurHoaro2017-01-171-28/+22
|
* Merge pull request #727 from ArthurHoaro/api/getlinksArthurHoaro2017-01-152-0/+458
|\ | | | | REST API: implement getLinks service
| * REST API: implement getLinks serviceArthurHoaro2017-01-152-0/+458
| | | | | | | | See http://shaarli.github.io/api-documentation/#links-links-collection-get
* | API: expect JWT in the Authorization headerVirtualTam2017-01-151-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/pull/731 Added: - require the presence of the 'Authorization' header Changed: - use the HTTP Bearer Token authorization schema See: - https://jwt.io/introduction/#how-do-json-web-tokens-work- - https://tools.ietf.org/html/rfc6750 - http://security.stackexchange.com/q/108662 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | API: fix JWT signature verificationVirtualTam2017-01-041-6/+9
|/ | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/shaarli/Shaarli/issues/737 Added: - Base64Url utilities Fixed: - use URL-safe Base64 encoding/decoding functions - use byte representations for HMAC digests - all JWT parts are Base64Url-encoded See: - https://en.wikipedia.org/wiki/JSON_Web_Token - https://tools.ietf.org/html/rfc7519 - https://scotch.io/tutorials/the-anatomy-of-a-json-web-token - https://jwt.io/introduction/ - https://en.wikipedia.org/wiki/Base64#URL_applications - https://secure.php.net/manual/en/function.base64-encode.php#103849 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* REST API structure using Slim frameworkArthurHoaro2016-12-153-0/+503
* REST API routes are handle by Slim. * Every API controller go through ApiMiddleware which handles security. * First service implemented `/info`, for tests purpose.