aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-08-13 18:25:48 +0200
committerHarald Eilertsen <haraldei@anduin.net>2023-08-13 18:25:48 +0200
commit1344b0a68a278e5044872c7df1c0697dac387338 (patch)
tree8b419e07836d8e87609ddd7fb3d6887e6f197936 /tests
parent5bbdbadda0651a85031a831234ba7e9c992c8fa0 (diff)
downloadvolse-hubzilla-1344b0a68a278e5044872c7df1c0697dac387338.tar.gz
volse-hubzilla-1344b0a68a278e5044872c7df1c0697dac387338.tar.bz2
volse-hubzilla-1344b0a68a278e5044872c7df1c0697dac387338.zip
tests: Test for get_account_by_id
First test that relies on the test db and fixtures.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/includes/AccountTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/includes/AccountTest.php b/tests/unit/includes/AccountTest.php
new file mode 100644
index 000000000..d123a0c70
--- /dev/null
+++ b/tests/unit/includes/AccountTest.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Tests for account handling helper functions.
+ */
+
+class AccountTest extends Zotlabs\Tests\Unit\UnitTestCase {
+ public function test_get_account_by_id_returns_existing_account() {
+ $account = get_account_by_id(42);
+ $this->assertNotFalse($account);
+ $this->assertEquals($this->fixtures['account'][0]['account_email'], $account['account_email']);
+ }
+}