diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-16 11:05:47 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2024-05-16 11:05:47 +0000 |
| commit | efaeea07319c63be2f2c6a8bd076e4de8ac8f11d (patch) | |
| tree | b6c4f4f976cee1e156f8f9dd0fec39a9f09e6242 /tests/jsonapi | |
| parent | bb2278c43c4992c2cc0fc2d468ad98a395e13962 (diff) | |
relocate flexi, fixes #4101
Closes #4101
Merge request studip/studip!2977
Diffstat (limited to 'tests/jsonapi')
| -rw-r--r-- | tests/jsonapi/BlubberThreadsCreateTest.php | 2 | ||||
| -rw-r--r-- | tests/jsonapi/BlubberThreadsIndexTest.php | 3 | ||||
| -rw-r--r-- | tests/jsonapi/BlubberThreadsShowTest.php | 2 | ||||
| -rw-r--r-- | tests/jsonapi/ConsultationHelper.php | 5 | ||||
| -rw-r--r-- | tests/jsonapi/_bootstrap.php | 1 |
5 files changed, 5 insertions, 8 deletions
diff --git a/tests/jsonapi/BlubberThreadsCreateTest.php b/tests/jsonapi/BlubberThreadsCreateTest.php index 17846f8..d2bdaea 100644 --- a/tests/jsonapi/BlubberThreadsCreateTest.php +++ b/tests/jsonapi/BlubberThreadsCreateTest.php @@ -22,7 +22,7 @@ class BlubberThreadsCreateTest extends \Codeception\Test\Unit // Create global template factory if neccessary $has_template_factory = isset($GLOBALS['template_factory']); if (!$has_template_factory) { - $GLOBALS['template_factory'] = new Flexi_TemplateFactory($GLOBALS['STUDIP_BASE_PATH'] . '/templates'); + $GLOBALS['template_factory'] = new Flexi\Factory($GLOBALS['STUDIP_BASE_PATH'] . '/templates'); } } diff --git a/tests/jsonapi/BlubberThreadsIndexTest.php b/tests/jsonapi/BlubberThreadsIndexTest.php index ab6d200..14173d3 100644 --- a/tests/jsonapi/BlubberThreadsIndexTest.php +++ b/tests/jsonapi/BlubberThreadsIndexTest.php @@ -1,6 +1,5 @@ <?php -use JsonApi\Errors\RecordNotFoundException; use JsonApi\Routes\Blubber\ThreadsIndex; require_once 'BlubberTestHelper.php'; @@ -21,7 +20,7 @@ class BlubberThreadsIndexTest extends \Codeception\Test\Unit // Create global template factory if neccessary $has_template_factory = isset($GLOBALS['template_factory']); if (!$has_template_factory) { - $GLOBALS['template_factory'] = new Flexi_TemplateFactory($GLOBALS['STUDIP_BASE_PATH'] . '/templates'); + $GLOBALS['template_factory'] = new Flexi\Factory($GLOBALS['STUDIP_BASE_PATH'] . '/templates'); } } diff --git a/tests/jsonapi/BlubberThreadsShowTest.php b/tests/jsonapi/BlubberThreadsShowTest.php index 932b768..875fc8c 100644 --- a/tests/jsonapi/BlubberThreadsShowTest.php +++ b/tests/jsonapi/BlubberThreadsShowTest.php @@ -23,7 +23,7 @@ class BlubberThreadsShowTest extends \Codeception\Test\Unit // Create global template factory if neccessary $has_template_factory = isset($GLOBALS['template_factory']); if (!$has_template_factory) { - $GLOBALS['template_factory'] = new Flexi_TemplateFactory($GLOBALS['STUDIP_BASE_PATH'] . '/templates'); + $GLOBALS['template_factory'] = new Flexi\Factory($GLOBALS['STUDIP_BASE_PATH'] . '/templates'); } } diff --git a/tests/jsonapi/ConsultationHelper.php b/tests/jsonapi/ConsultationHelper.php index a46cb47..673174e 100644 --- a/tests/jsonapi/ConsultationHelper.php +++ b/tests/jsonapi/ConsultationHelper.php @@ -3,9 +3,6 @@ use WoohooLabs\Yang\JsonApi\Response\JsonApiResponse; use WoohooLabs\Yang\JsonApi\Schema\Document; use WoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObject; -// Required for consultation mailer -require_once 'vendor/flexi/flexi.php'; - trait ConsultationHelper { /** @@ -96,7 +93,7 @@ trait ConsultationHelper // Create global template factory if neccessary $has_template_factory = isset($GLOBALS['template_factory']); if (!$has_template_factory) { - $GLOBALS['template_factory'] = new Flexi_TemplateFactory($GLOBALS['STUDIP_BASE_PATH'] . '/templates'); + $GLOBALS['template_factory'] = new Flexi\Factory($GLOBALS['STUDIP_BASE_PATH'] . '/templates'); } $result = $this->tester->withPHPLib($credentials, $fn); diff --git a/tests/jsonapi/_bootstrap.php b/tests/jsonapi/_bootstrap.php index cb6df04..dea1c81 100644 --- a/tests/jsonapi/_bootstrap.php +++ b/tests/jsonapi/_bootstrap.php @@ -45,6 +45,7 @@ StudipAutoloader::addAutoloadPath($GLOBALS['STUDIP_BASE_PATH'].'/lib/models/cale StudipAutoloader::addAutoloadPath($GLOBALS['STUDIP_BASE_PATH'].'/lib/models/resources'); StudipAutoloader::addAutoloadPath($GLOBALS['STUDIP_BASE_PATH'].'/lib/classes'); StudipAutoloader::addAutoloadPath($GLOBALS['STUDIP_BASE_PATH'].'/lib/classes', 'Studip'); +StudipAutoloader::addAutoloadPath($GLOBALS['STUDIP_BASE_PATH'].'/lib/flexi', 'Flexi'); // Plugins StudipAutoloader::addAutoloadPath($GLOBALS['STUDIP_BASE_PATH'].'/lib/plugins/core'); |
