From 8c85516c57cad928758623129a4258730b14c98f Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 14 Jun 2023 23:00:44 +0200 Subject: Unit tests: Book Hubzilla to make app env available in tests. Not quite unit test clean, but a somewhat pragmatic approach to make the tests pass as is. --- tests/unit/UnitTestCase.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/UnitTestCase.php b/tests/unit/UnitTestCase.php index 7d706d5be..f6fb28555 100644 --- a/tests/unit/UnitTestCase.php +++ b/tests/unit/UnitTestCase.php @@ -24,6 +24,12 @@ namespace Zotlabs\Tests\Unit; use PHPUnit\Framework\TestCase; +/* + * Make sure global constants and the global App object is available to the + * tests. + */ +require_once __DIR__ . '/../../boot.php'; + /** * @brief Base class for our Unit Tests. * -- cgit v1.2.3 From 1fcb05ed8c0804ebd0f01e6881fc6e40555d3b60 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 14 Jun 2023 23:02:13 +0200 Subject: Unit tests: Update Markdown tests to reflect that it works. --- tests/unit/includes/MarkdownTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/includes/MarkdownTest.php b/tests/unit/includes/MarkdownTest.php index 98fe40a49..953305074 100644 --- a/tests/unit/includes/MarkdownTest.php +++ b/tests/unit/includes/MarkdownTest.php @@ -62,9 +62,9 @@ class MarkdownTest extends UnitTestCase { 'text1 text2 ', 'text1 text2' ], - 'HTML entities, lt does not work' => [ + 'HTML entities' => [ '& gt > lt <', - '& gt > lt' + '& gt > lt <' ], 'escaped HTML entities' => [ '& lt < gt >', -- cgit v1.2.3