Commit graph

9 commits

Author SHA1 Message Date
VirtualTam
d1e2f8e52c PHP: ensure 5.3 compatibility, refactor timezone utilities
Relates to #250

Modifications
 - supported version
   - bump required version from 5.1.0 to 5.3.x
   - update README
   - add PHP 5.3 to Travis environments
 - rewrite array declarations: explicitely use array() instead of []
 - move checkPHPVersion to application/Utils.php
 - move timezone functions to application/TimeZone.php
   - cleanup code
   - improve test coverage

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-07-13 13:06:06 +02:00
VirtualTam
07b6fa750b LinkDB: prefix private members with an underscore
Relates to #95, #218

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-07-09 21:46:01 +02:00
VirtualTam
9186ab9594 LinkDB::filterDay(): check input date format
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-07-09 00:44:19 +02:00
VirtualTam
0037fbe1e0 LinkDBTest: only check that the datastore is created and non-empty
Fixes #252
Relates to #238

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-06-28 14:53:26 +02:00
nodiscc
d72ae3d7e8 Merge remote-tracking branch 'ArthurHoaro/default-links' 2015-06-26 22:03:25 +02:00
VirtualTam
9c8752a206 LinkDB: do not access global variables
Relates to #218

Removes "hidden" access to the following variables:
 - $GLOBALS['config']['datastore']
 - PHPPREFIX
 - PHPSUFFIX

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-06-24 23:26:52 +02:00
ArthurHoaro
30e6f1ca2f Fixes unit tests: checking datastore filesize instead of hash.
date() makes the hash validation worthless because it changes at every generation.
2015-06-24 11:58:01 +02:00
VirtualTam
9f15ca9ee7 LinkDB: add 'hidePublicLinks' parameter to the constructor
Fixes #236
Relates to #237

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-06-24 00:26:59 +02:00
VirtualTam
ca74886f30 LinkDB: move to a proper file, add test coverage
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>
2015-06-11 00:45:45 +02:00