From 4a51c6419f0311d3f031173775450bc0049a24d1 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 3 Feb 2021 10:27:04 -0500 Subject: [PATCH] Fix tests --- tests/AnimeClient/AnimeClientTestCase.php | 4 ++-- tests/Ion/IonTestCase.php | 2 +- tests/bootstrap.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/AnimeClient/AnimeClientTestCase.php b/tests/AnimeClient/AnimeClientTestCase.php index 36641c92..56810bcc 100644 --- a/tests/AnimeClient/AnimeClientTestCase.php +++ b/tests/AnimeClient/AnimeClientTestCase.php @@ -33,7 +33,7 @@ class AnimeClientTestCase extends TestCase { use MatchesSnapshots; // Test directory constants - public const ROOT_DIR = ROOT_DIR; + public const ROOT_DIR = AC_TEST_ROOT_DIR; public const SRC_DIR = SRC_DIR; public const TEST_DATA_DIR = __DIR__ . '/test_data'; public const TEST_VIEW_DIR = __DIR__ . '/test_views'; @@ -60,7 +60,7 @@ class AnimeClientTestCase extends TestCase { $config_array = [ 'asset_path' => '/assets', - 'img_cache_path' => _dir(ROOT_DIR, 'public/images'), + 'img_cache_path' => _dir(self::ROOT_DIR, 'public/images'), 'data_cache_path' => _dir(self::TEST_DATA_DIR, 'cache'), 'cache' => [ 'driver' => 'null', diff --git a/tests/Ion/IonTestCase.php b/tests/Ion/IonTestCase.php index 5ef93684..6a2cc3a9 100644 --- a/tests/Ion/IonTestCase.php +++ b/tests/Ion/IonTestCase.php @@ -27,7 +27,7 @@ use Laminas\Diactoros\ServerRequestFactory; */ class IonTestCase extends TestCase { // Test directory constants - public const ROOT_DIR = ROOT_DIR; + public const ROOT_DIR = AC_TEST_ROOT_DIR; public const SRC_DIR = SRC_DIR; public const TEST_DATA_DIR = __DIR__ . '/test_data'; public const TEST_VIEW_DIR = __DIR__ . '/test_views'; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index f7e04e67..27c3aabd 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -10,8 +10,8 @@ if ($timezone === '' || $timezone === FALSE) ini_set('date.timezone', 'GMT'); } -define('ROOT_DIR', dirname(__DIR__) . '/'); -define('SRC_DIR', ROOT_DIR . 'src/'); +define('AC_TEST_ROOT_DIR', dirname(__DIR__) . '/'); +define('SRC_DIR', AC_TEST_ROOT_DIR . 'src/'); define('TEST_DIR', __DIR__ . '/'); // ----------------------------------------------------------------------------- @@ -20,7 +20,7 @@ define('TEST_DIR', __DIR__ . '/'); require_once TEST_DIR . 'AnimeClient/AnimeClientTestCase.php'; require_once TEST_DIR . '/Ion/IonTestCase.php'; -require_once ROOT_DIR . 'vendor/autoload.php'; +require_once AC_TEST_ROOT_DIR . 'vendor/autoload.php'; // ----------------------------------------------------------------------------- // Ini Settings