diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-11-03 23:54:24 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-11-04 01:50:40 +0000 |
| commit | a04bb9a236e92915034f97b1229f5d47c9bc750f (patch) | |
| tree | 8c6af0cb01faf99962997494c6c4f427254a5118 /tests/app/Module/DescendancyReportModuleTest.php | |
| parent | 618eece25a0a86b9c141d6ddb2dbe55462254562 (diff) | |
| download | webtrees-a04bb9a236e92915034f97b1229f5d47c9bc750f.tar.gz webtrees-a04bb9a236e92915034f97b1229f5d47c9bc750f.tar.bz2 webtrees-a04bb9a236e92915034f97b1229f5d47c9bc750f.zip | |
Fix: #2479 - admin manage media showing wrong files; Attach filesystems to request
Diffstat (limited to 'tests/app/Module/DescendancyReportModuleTest.php')
| -rw-r--r-- | tests/app/Module/DescendancyReportModuleTest.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/app/Module/DescendancyReportModuleTest.php b/tests/app/Module/DescendancyReportModuleTest.php index 49d8ea0245..bacfe8bab1 100644 --- a/tests/app/Module/DescendancyReportModuleTest.php +++ b/tests/app/Module/DescendancyReportModuleTest.php @@ -27,6 +27,8 @@ use Fisharebest\Webtrees\Report\ReportPdf; use Fisharebest\Webtrees\Services\UserService; use Fisharebest\Webtrees\TestCase; use Fisharebest\Webtrees\Webtrees; +use League\Flysystem\Adapter\NullAdapter; +use League\Flysystem\Filesystem; /** * Test harness for the class DescendancyReportModule @@ -76,6 +78,8 @@ class DescendancyReportModuleTest extends TestCase */ public function testReportRunsWithoutError(): void { + $data_filesystem = new Filesystem(new NullAdapter()); + $user = (new UserService())->create('user', 'User', 'user@example.com', 'secret'); $user->setPreference('canadmin', '1'); Auth::login($user); @@ -93,13 +97,13 @@ class DescendancyReportModuleTest extends TestCase $this->assertIsArray($report->reportProperties()); ob_start(); - new ReportParserGenerate($xml, new ReportHtml(), $vars, $tree); + new ReportParserGenerate($xml, new ReportHtml(), $vars, $tree, $data_filesystem); $html = ob_get_clean(); $this->assertStringStartsWith('<', $html); $this->assertStringEndsWith('>', $html); ob_start(); - new ReportParserGenerate($xml, new ReportPdf(), $vars, $tree); + new ReportParserGenerate($xml, new ReportPdf(), $vars, $tree, $data_filesystem); $pdf = ob_get_clean(); $this->assertStringStartsWith('%PDF', $pdf); $this->assertStringEndsWith("%%EOF\n", $pdf); |
