aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/UnitTestCase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/UnitTestCase.php')
-rw-r--r--tests/unit/UnitTestCase.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/unit/UnitTestCase.php b/tests/unit/UnitTestCase.php
index b98845985..97ac1576e 100644
--- a/tests/unit/UnitTestCase.php
+++ b/tests/unit/UnitTestCase.php
@@ -78,8 +78,11 @@ class UnitTestCase extends TestCase {
$this->in_transaction = \DBA::$dba->db->beginTransaction();
$this->loadFixtures();
-
}
+
+ // Make sure app config is reset and loaded from fixtures
+ \App::$config = array();
+ \Zotlabs\Lib\Config::Load('system');
}
protected function tearDown() : void {
@@ -116,10 +119,6 @@ class UnitTestCase extends TestCase {
$table_name = basename($file, '.yml');
$this->fixtures[$table_name] = yaml_parse_file($file)[$table_name];
- //echo "\n[*] Loaded fixture '{$table_name}':\n";
- // . print_r($this->fixtures[$table_name], true)
- // . PHP_EOL;
-
foreach ($this->fixtures[$table_name] as $entry) {
$query = 'INSERT INTO ' . dbesc($table_name) . '('
. implode(',', array_keys($entry))
@@ -127,7 +126,6 @@ class UnitTestCase extends TestCase {
. implode(',', array_map(fn($val) => "'{$val}'", array_values($entry)))
. ')';
- //print_r($query);
q($query);
}
}