X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fbootstrap.php;h=2d675c9a006d9ab24f1e4e522df8f5a7e7de476e;hb=a5a9cf23acd1248585173aa32757d9720b5f2d62;hp=d36d73cd8d3d7a95a56ae16666a287519d937982;hpb=d8acf8550480694d050091e270a06c01e7b313f0;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/bootstrap.php b/tests/bootstrap.php index d36d73cd..2d675c9a 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,3 +4,29 @@ require_once 'vendor/autoload.php'; $conf = new \Shaarli\Config\ConfigManager('tests/utils/config/configJson'); new \Shaarli\Languages('en', $conf); + +// is_iterable is only compatible with PHP 7.1+ +if (!function_exists('is_iterable')) { + function is_iterable($var) + { + return is_array($var) || $var instanceof \Traversable; + } +} + +// TODO: remove this after fixing UT +require_once 'application/bookmark/LinkUtils.php'; +require_once 'application/Utils.php'; +require_once 'application/http/UrlUtils.php'; +require_once 'application/http/HttpUtils.php'; +require_once 'tests/TestCase.php'; +require_once 'tests/container/ShaarliTestContainer.php'; +require_once 'tests/front/controller/visitor/FrontControllerMockHelper.php'; +require_once 'tests/front/controller/admin/FrontAdminControllerMockHelper.php'; +require_once 'tests/updater/DummyUpdater.php'; +require_once 'tests/utils/FakeBookmarkService.php'; +require_once 'tests/utils/FakeConfigManager.php'; +require_once 'tests/utils/ReferenceHistory.php'; +require_once 'tests/utils/ReferenceLinkDB.php'; +require_once 'tests/utils/ReferenceSessionIdHashes.php'; + +\ReferenceSessionIdHashes::genAllHashes();