aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/Entity/RegistrationTest.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2025-02-15 21:45:59 +0100
committerHarald Eilertsen <haraldei@anduin.net>2025-06-29 13:28:23 +0200
commit9884bb7f1d0a2e65b32f517b55550a3123f3e2c3 (patch)
tree85217f25a14f82bf95bb5786b5e4d5b900368727 /tests/unit/Entity/RegistrationTest.php
parenta17601643b1e9f5f6505487ca5e761f1e6073656 (diff)
downloadvolse-hubzilla-add-registration-entity-class.tar.gz
volse-hubzilla-add-registration-entity-class.tar.bz2
volse-hubzilla-add-registration-entity-class.zip
Add Registration::get methodadd-registration-entity-class
Diffstat (limited to 'tests/unit/Entity/RegistrationTest.php')
-rw-r--r--tests/unit/Entity/RegistrationTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/Entity/RegistrationTest.php b/tests/unit/Entity/RegistrationTest.php
index 31e421914..3e4412545 100644
--- a/tests/unit/Entity/RegistrationTest.php
+++ b/tests/unit/Entity/RegistrationTest.php
@@ -39,6 +39,18 @@ class RegistrationTest extends UnitTestCase {
$this->assertEquals($target['reg_lang'], $reg->lang);
}
+ public function test_get_registration_by_id(): void {
+ $target = $this->fixtures['register'][0];
+
+ $reg = Registration::get(intval($target['reg_id']));
+
+ $this->assertInstanceOf(Registration::class, $reg);
+
+ $this->assertEquals($target['reg_uid'], $reg->uid);
+ $this->assertEquals($target['reg_hash'], $reg->hash);
+ $this->assertEquals($target['reg_lang'], $reg->lang);
+ }
+
#[DataProvider('findByHashProvider')]
public function test_find_by_hash(string $hash, bool $expect_success): void {
$reg = Registration::find_by_hash($hash);