aboutsummaryrefslogtreecommitdiff
path: root/tests/jsonapi
diff options
context:
space:
mode:
Diffstat (limited to 'tests/jsonapi')
-rw-r--r--tests/jsonapi/BlubberThreadsCreateTest.php2
-rw-r--r--tests/jsonapi/BlubberThreadsIndexTest.php3
-rw-r--r--tests/jsonapi/BlubberThreadsShowTest.php2
-rw-r--r--tests/jsonapi/ConsultationHelper.php5
-rw-r--r--tests/jsonapi/_bootstrap.php1
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');