aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2024-11-03 11:57:45 +0100
committerMario Vavti <mario@mariovavti.com>2024-11-03 11:57:45 +0100
commit21b60bf119a3d070e385c1011f4c3ccb9951f23c (patch)
tree43d78d9a1ae07cb5add65b04f23a79e722fc26bc
parentd25314c75b0941b91f73eb39cba489ec6b48c301 (diff)
parent5db3f93be9e9777184609a7f7e6988d36dfc5615 (diff)
downloadvolse-hubzilla-21b60bf119a3d070e385c1011f4c3ccb9951f23c.tar.gz
volse-hubzilla-21b60bf119a3d070e385c1011f4c3ccb9951f23c.tar.bz2
volse-hubzilla-21b60bf119a3d070e385c1011f4c3ccb9951f23c.zip
Merge branch 'dev' into containers
-rw-r--r--Zotlabs/Module/Setup.php5
-rw-r--r--Zotlabs/Web/HttpMeta.php13
-rw-r--r--tests/unit/UnitTestCase.php2
-rw-r--r--tests/unit/Widget/HelpindexTest.php10
4 files changed, 18 insertions, 12 deletions
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index 35079e5e5..5b423f67d 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -263,7 +263,10 @@ class Setup extends \Zotlabs\Web\Controller {
$this->check_htaccess($checks);
- $checkspassed = array_reduce($checks, "self::check_passed", true);
+ $checkspassed = array_reduce(
+ $checks,
+ "Zotlabs\Module\Setup::check_passed",
+ true);
$tpl = get_markup_template('install_checks.tpl');
$o .= replace_macros($tpl, array(
diff --git a/Zotlabs/Web/HttpMeta.php b/Zotlabs/Web/HttpMeta.php
index 7cf93dda9..d12037a51 100644
--- a/Zotlabs/Web/HttpMeta.php
+++ b/Zotlabs/Web/HttpMeta.php
@@ -5,16 +5,9 @@ namespace Zotlabs\Web;
class HttpMeta {
- private $vars = null;
- private $og = null;
-
- function __construct() {
-
- $this->vars = [];
- $this->og = [];
- $this->ogproperties = [];
-
- }
+ private $vars = [];
+ private $og = [];
+ private $ogproperties = [];
//Set Meta Value
// Mode:
diff --git a/tests/unit/UnitTestCase.php b/tests/unit/UnitTestCase.php
index afc309205..79f0ec440 100644
--- a/tests/unit/UnitTestCase.php
+++ b/tests/unit/UnitTestCase.php
@@ -47,7 +47,7 @@ require_once 'include/dba/dba_transaction.php';
*/
class UnitTestCase extends TestCase {
protected array $fixtures = array();
- protected ?\DbaTransaction $db_transacton = null;
+ protected ?\DbaTransaction $db_transaction = null;
/**
* Connect to the test db, load fixtures and global config.
diff --git a/tests/unit/Widget/HelpindexTest.php b/tests/unit/Widget/HelpindexTest.php
index 26aa34104..87042c559 100644
--- a/tests/unit/Widget/HelpindexTest.php
+++ b/tests/unit/Widget/HelpindexTest.php
@@ -8,6 +8,8 @@
* SPDX-License-Identifier: MIT
*/
+use PHPUnit\Framework\Attributes\Before;
+
/**
* Test class for testing the Helpindex widget.
*/
@@ -15,6 +17,8 @@ class HelpindexTest extends \Zotlabs\Tests\Unit\Module\TestCase {
use \phpmock\phpunit\PHPMock;
+ private string $output;
+
/**
* Define the stubs to make sure they work later in the test.
*
@@ -27,6 +31,12 @@ class HelpindexTest extends \Zotlabs\Tests\Unit\Module\TestCase {
self::defineFunctionMock('Zotlabs\Widget', 'file_get_contents');
}
+ #[Before]
+ public function setup_state(): void {
+ // Make sure the output is cleared before running the test
+ $this->output = '';
+ }
+
public function test_loading_toc(): void {
// Stub `file_get_contents` to plant our own content.
$fgc_stub = $this->getFunctionMock('Zotlabs\Widget', 'file_get_contents');