summaryrefslogtreecommitdiff
path: root/tests/app/NoteTest.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2022-05-11 13:50:29 +0100
committerGreg Roach <greg@subaqua.co.uk>2022-05-11 13:51:10 +0100
commitc1d58f7493cc1f7b5837f5fb6e3d76121072388d (patch)
treeb533f677845a4781947ef59795ea3d67018ee28d /tests/app/NoteTest.php
parenta5c812b28a13cb7973eea369b774e1eb4d4bdf71 (diff)
downloadwebtrees-c1d58f7493cc1f7b5837f5fb6e3d76121072388d.tar.gz
webtrees-c1d58f7493cc1f7b5837f5fb6e3d76121072388d.tar.bz2
webtrees-c1d58f7493cc1f7b5837f5fb6e3d76121072388d.zip
Fix: #4393 - name of multi-paragraph note
Diffstat (limited to 'tests/app/NoteTest.php')
-rw-r--r--tests/app/NoteTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/app/NoteTest.php b/tests/app/NoteTest.php
index 20e5553911..56001e255e 100644
--- a/tests/app/NoteTest.php
+++ b/tests/app/NoteTest.php
@@ -26,6 +26,8 @@ namespace Fisharebest\Webtrees;
*/
class NoteTest extends TestCase
{
+ protected static bool $uses_database = true;
+
/**
* Test that the class exists
*
@@ -35,4 +37,12 @@ class NoteTest extends TestCase
{
self::assertTrue(class_exists(Note::class));
}
+
+ public function testNoteName(): void
+ {
+ $tree = $this->createStub(Tree::class);
+ $note = new Note('X123', "0 @X123@ NOTE 1\n1 CONT\n1 CONT 2\n1 CONT 3\n1 CONT 4", null, $tree);
+
+ self::assertSame('<bdi>1</bdi>', $note->fullName());
+ }
}