summaryrefslogtreecommitdiff
path: root/tests/app/Module/DescendancyReportModuleTest.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-03-15 18:14:09 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-03-20 07:22:59 +0000
commit3c5bb98b6dc8b535dd6d02c009d1748959dee388 (patch)
treef6579d10218627a1c38af024a16b8c435425fef7 /tests/app/Module/DescendancyReportModuleTest.php
parent6113edef98ca0d6ccd32d87c5ef69dbe3ec83127 (diff)
downloadwebtrees-3c5bb98b6dc8b535dd6d02c009d1748959dee388.tar.gz
webtrees-3c5bb98b6dc8b535dd6d02c009d1748959dee388.tar.bz2
webtrees-3c5bb98b6dc8b535dd6d02c009d1748959dee388.zip
Testing
Diffstat (limited to 'tests/app/Module/DescendancyReportModuleTest.php')
-rw-r--r--tests/app/Module/DescendancyReportModuleTest.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/app/Module/DescendancyReportModuleTest.php b/tests/app/Module/DescendancyReportModuleTest.php
index 419d35664a..1b9f1a241d 100644
--- a/tests/app/Module/DescendancyReportModuleTest.php
+++ b/tests/app/Module/DescendancyReportModuleTest.php
@@ -17,9 +17,11 @@ declare(strict_types=1);
namespace Fisharebest\Webtrees\Module;
+use Fisharebest\Webtrees\Auth;
use Fisharebest\Webtrees\Report\ReportHtml;
use Fisharebest\Webtrees\Report\ReportParserGenerate;
use Fisharebest\Webtrees\Report\ReportPdf;
+use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\Tree;
/**
@@ -70,11 +72,15 @@ class DescendancyReportModuleTest extends \Fisharebest\Webtrees\TestCase
*/
public function testReportRunsWithoutError(): void
{
+ $user = (new UserService())->create('user', 'User', 'user@example.com', 'secret');
+ $user->setPreference('canadmin', '1');
+ Auth::login($user);
+
$tree = $this->importTree('demo.ged');
app()->instance(Tree::class, $tree);
$xml = WT_ROOT . 'resources/xml/reports/descendancy_report.xml';
$vars = [
- 'pid' => ['id' => 'i1'],
+ 'pid' => ['id' => 'X1030'],
'maxgen' => ['id' => '3'],
'sources' => ['id' => 'on'],
'pageSize' => ['id' => 'A4'],