getFunctionMock('Zotlabs\Module', 'local_channel'); $lc_stub ->expects($this->once()) ->willReturn(false); $this->get('rbmark', ['url' => 'https://bookmarked.url']); $this->assertPageContains('value="login" />'); // also check that the original query is saved in the session $this->assertEquals('https://bookmarked.url', $_SESSION['bookmark']['url']); $this->assertEquals('rbmark', $_SESSION['bookmark']['q']); } public function test_authenticated_get_request_returns_save_bookmark_form(): void { $lc_stub = $this->getFunctionMock('Zotlabs\Module', 'local_channel'); $lc_stub ->expects($this->once()) ->willReturn(42); $this->get('rbmark', [ 'url' => 'https://bookmarked.url', 'title' => 'My bookmark', ]); $this->assertPageContains('