diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-03-02 21:12:45 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-03-02 21:12:45 +0000 |
| commit | c5e5c1cea5f7d35d6fd56eb77c9a68e91d21befe (patch) | |
| tree | b78b9a9fae0c485a89453353946b8db1ac599ceb /tests/feature | |
| parent | 206791b077c8b40520d6edcaa713013e65241ec6 (diff) | |
| download | webtrees-c5e5c1cea5f7d35d6fd56eb77c9a68e91d21befe.tar.gz webtrees-c5e5c1cea5f7d35d6fd56eb77c9a68e91d21befe.tar.bz2 webtrees-c5e5c1cea5f7d35d6fd56eb77c9a68e91d21befe.zip | |
Fix tests
Diffstat (limited to 'tests/feature')
| -rw-r--r-- | tests/feature/EmbeddedVariablesTest.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/feature/EmbeddedVariablesTest.php b/tests/feature/EmbeddedVariablesTest.php index b97de6f7f8..cb0f2c5eae 100644 --- a/tests/feature/EmbeddedVariablesTest.php +++ b/tests/feature/EmbeddedVariablesTest.php @@ -69,11 +69,12 @@ class EmbeddedVariablesTest extends TestCase */ public function testAllEmbeddedVariables(): void { - global $tree; // For Date::display() - $tree = $this->importTree('demo.ged'); $statistics = new Statistics(new ModuleService(), $tree, new UserService()); + // For Date::display() + app()->instance(Tree::class, $tree); + // As visitor $text = $statistics->embedTags('#getAllTagsTable#'); $this->assertNotEquals('#getAllTagsTable#', $text); @@ -92,12 +93,12 @@ class EmbeddedVariablesTest extends TestCase */ public function testAllEmbeddedVariablesWithEmptyTree(): void { - global $tree; // For Date::display() - - $tree = Tree::create('name', 'title'); - $tree->deleteGenealogyData(false); + $tree = Tree::create('name', 'title'); $statistics = new Statistics(new ModuleService(), $tree, new UserService()); + // For Date::display() + app()->instance(Tree::class, $tree); + // As visitor $text = $statistics->embedTags('#getAllTagsTable#'); $this->assertNotEquals('#getAllTagsTable#', $text); |
