stub_is_site_admin = $this->getFunctionMock('Zotlabs\Module', 'is_site_admin') ->expects($this->once()) ->willReturn(true); $this->info = []; $this->stub_info = $this->getFunctionMock('Zotlabs\Module\Admin', 'info') ->expects($this->any()) ->willReturnCallback(function (string $arg) { $this->info[] = $arg; }); $this->notice = []; $this->stub_notice = $this->getFunctionMock('Zotlabs\Module\Admin', 'notice') ->expects($this->any()) ->willReturnCallback(function (string $arg) { $this->notice[] = $arg; }); } #[After] public function tear_down_mocks(): void { $this->stub_is_site_admin = null; $this->stub_info = null; $this->stub_notice = null; $this->stub_check_security = null; $this->stub_get_form_security_token = null; } public function test_rendering_admin_account_edit_page(): void { $this->stub_get_form_security_token = $this->getFunctionMock('Zotlabs\Module\Admin', 'get_form_security_token') ->expects($this->once()) ->willReturn('the-csrf-token'); $account = $this->fixtures['account'][0]; $this->get("admin/account_edit/{$account['account_id']}"); $this->assertPageContains("