diff options
Diffstat (limited to 'tests/unit/Module')
-rw-r--r-- | tests/unit/Module/HelpTest.php | 4 | ||||
-rw-r--r-- | tests/unit/Module/MagicTest.php | 8 | ||||
-rw-r--r-- | tests/unit/Module/TestCase.php | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/tests/unit/Module/HelpTest.php b/tests/unit/Module/HelpTest.php index 1feef26a8..e1aea1a06 100644 --- a/tests/unit/Module/HelpTest.php +++ b/tests/unit/Module/HelpTest.php @@ -76,13 +76,13 @@ class HelpTest extends \Zotlabs\Tests\Unit\Module\TestCase { public function test_get_request_without_args_redirects_to_about_page(): void { $this->stub_goaway(); $this->expectException(\Zotlabs\Tests\Unit\Module\RedirectException::class); - $this->expectExceptionMessage('about/about'); + $this->expectExceptionMessage('about'); $this->get('help'); } public function test_getting_locale_with_no_topic_should_redirect_to_about_page(): void { - $this->expectRedirectTo('help/about/about'); + $this->expectRedirectTo('help/about'); $this->get('help/de'); } diff --git a/tests/unit/Module/MagicTest.php b/tests/unit/Module/MagicTest.php index 4a03d9d57..2c426bf76 100644 --- a/tests/unit/Module/MagicTest.php +++ b/tests/unit/Module/MagicTest.php @@ -46,9 +46,9 @@ class MagicTest extends TestCase { App::set_baseurl($baseurl); - App::$observer = [ + App::set_observer([ 'xchan_hash' => 'the hash', - ]; + ]); // We pass a local URL, and have a valid observer, but as the // delegate param is not passed, nothing will be done except @@ -72,9 +72,9 @@ class MagicTest extends TestCase { App::$timezone = 'UTC'; // Simulate a foreign (to this hub) observer, - App::$observer = [ + App::set_observer([ 'xchan_hash' => 'foreign hash', - ]; + ]); // Create the channel the foreign observer wants to access $result = create_identity([ diff --git a/tests/unit/Module/TestCase.php b/tests/unit/Module/TestCase.php index 1a4cf52fc..dd88a5a3b 100644 --- a/tests/unit/Module/TestCase.php +++ b/tests/unit/Module/TestCase.php @@ -43,6 +43,8 @@ class TestCase extends UnitTestCase { $_SERVER['REQUEST_METHOD'] = $method; $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; $_SERVER['QUERY_STRING'] = "q={$uri}"; + $_SERVER['REQUEST_URI'] = $uri; + // phpcs:disable Generic.PHP.DisallowRequestSuperglobal.Found $_REQUEST = array_merge($_GET, $_POST); // phpcs::enable |