/** * test get all registry data * * @return void * * @todo add more assertions */ public function testGetAllRegistryData() { $registryData = $this->_instance->getAllRegistryData(); $currentUser = Tinebase_Core::getUser(); $this->assertEquals($currentUser->toArray(), $registryData['Tinebase']['currentAccount']); $this->assertEquals(Addressbook_Controller_Contact::getInstance()->getContactByUserId($currentUser->getId())->toArray(), $registryData['Tinebase']['userContact']); }
/** * test get all registry data with persistent filters * * @return void * * @see 0009610: shared favorites acl */ public function testGetAllPersistentFilters() { $this->markTestSkipped('@see 0010192: fix persistent filter tests'); $registryData = $this->_instance->getAllRegistryData(); $filterData = $registryData['Tinebase']['persistentFilters']; $this->assertTrue($filterData['totalcount'] > 10); $this->assertTrue(isset($filterData['results'][0]['grants']), 'grants are missing'); $grants = $filterData['results'][0]['grants']; $this->assertTrue($grants[0]['readGrant']); // check if accounts are resolved $this->assertTrue(is_array($grants[0]['account_name']), 'account should be resolved: ' . print_r($grants[0], true)); }