From 33452075ab6dce3988b8b5ce4cc4276e014cb561 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 8 Oct 2022 21:34:59 +0200 Subject: [PATCH] fix tests --- Controller/ApiController.php | 9 +++++---- Theme/Backend/editor-create.tpl.php | 4 ++-- tests/Bootstrap.php | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index edf6e73..261fd3a 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -281,10 +281,11 @@ final class ApiController extends Controller MediaMapper::create()->execute($media); EditorDocMapper::writer()->createRelationTable('media', [$media->getId()], $doc->getId()); - $ref = new Reference(); - $ref->name = $media->name; - $ref->source = new NullMedia($media->getId()); - $ref->createdBy = new NullAccount($request->header->account); + $ref = new Reference(); + $ref->name = $media->name; + $ref->source = new NullMedia($media->getId()); + $ref->createdBy = new NullAccount($request->header->account); + $ref->setVirtualPath($accountPath = '/Accounts/' . $account->getId() . ' ' . $account->login . '/Editor/' . $doc->createdAt->format('Y') . '/' . $doc->createdAt->format('m') . '/' . $doc->getId()); ReferenceMapper::create()->execute($ref); diff --git a/Theme/Backend/editor-create.tpl.php b/Theme/Backend/editor-create.tpl.php index 6b3e621..43b38e7 100755 --- a/Theme/Backend/editor-create.tpl.php +++ b/Theme/Backend/editor-create.tpl.php @@ -29,7 +29,7 @@ echo $this->getData('nav')->render(); ?>
-
+
@@ -65,7 +65,7 @@ echo $this->getData('nav')->render(); ?>
-
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 252a62f..d46fd31 100755 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -1,4 +1,5 @@ -