summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2025-01-09 17:38:55 +0000
committerGreg Roach <greg@subaqua.co.uk>2025-01-09 17:41:17 +0000
commit5bf1596e0b049d5627260e02f69a09c66be05add (patch)
tree0f5bdfa73cbaa06dc0820383ad0a3850f7226547 /tests
parent9fb109b2bcf8cbe8e6d7bbe6e417b923ef8dd951 (diff)
downloadwebtrees-5bf1596e0b049d5627260e02f69a09c66be05add.tar.gz
webtrees-5bf1596e0b049d5627260e02f69a09c66be05add.tar.bz2
webtrees-5bf1596e0b049d5627260e02f69a09c66be05add.zip
Fix: #5100, fix: #4828 - _UID fields have wrong checksum. Do not automatically create new when editing.
Diffstat (limited to 'tests')
-rw-r--r--tests/app/Elements/PafUidTest.php8
-rw-r--r--tests/app/Elements/UidTest.php10
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/app/Elements/PafUidTest.php b/tests/app/Elements/PafUidTest.php
index fb6d28420c..6d713d03a2 100644
--- a/tests/app/Elements/PafUidTest.php
+++ b/tests/app/Elements/PafUidTest.php
@@ -34,4 +34,12 @@ class PafUidTest extends AbstractElementTestCase
self::$element = new PafUid('label');
}
+
+ public function testCanonical(): void
+ {
+ self::assertSame(
+ 'FEF44CA3CA7543ED9A05F00591315274D810',
+ self::$element->canonical('fef44CA3CA7543ED9A05F005913152740000'),
+ );
+ }
}
diff --git a/tests/app/Elements/UidTest.php b/tests/app/Elements/UidTest.php
index 73db13131b..50db4765c4 100644
--- a/tests/app/Elements/UidTest.php
+++ b/tests/app/Elements/UidTest.php
@@ -32,6 +32,14 @@ class UidTest extends AbstractElementTestCase
{
parent::setUpBeforeClass();
- self::$element = new PafUid('label');
+ self::$element = new Uid('label');
+ }
+
+ public function testCanonical(): void
+ {
+ self::assertSame(
+ 'fef44ca3-ca75-43ed-9a05-f00591315274',
+ self::$element->canonical('FEF44ca3ca7543ed9a05f00591315274'),
+ );
}
}