/**
  * createProjectWithContactRelation
  * 
  * @return array
  */
 protected function _createProjectWithContactRelation()
 {
     $project = $this->_getProjectData();
     $contact = $this->_getContactData();
     $project['relations'] = array(array('own_model' => 'Projects_Model_Project', 'own_backend' => 'Sql', 'own_id' => 0, 'own_degree' => Tinebase_Model_Relation::DEGREE_SIBLING, 'type' => 'COWORKER', 'related_record' => NULL, 'related_backend' => 'Sql', 'related_id' => Tinebase_Core::getUser()->contact_id, 'related_model' => 'Addressbook_Model_Contact', 'remark' => NULL));
     $projectData = $this->_json->saveProject($project);
     return $projectData;
 }
 /**
  * test project relation filter
  */
 public function testProjectRelationFilter()
 {
     if (!Setup_Controller::getInstance()->isInstalled('Projects')) {
         $this->markTestSkipped('Projects not installed.');
     }
     $contact = $this->_uit->saveContact($this->_getContactData());
     $project = $this->_getProjectData($contact);
     $projectJson = new Projects_Frontend_Json();
     $newProject = $projectJson->saveProject($project);
     $this->_testProjectRelationFilter($contact, 'definedBy', $newProject);
     $this->_testProjectRelationFilter($contact, 'in', $newProject);
     $this->_testProjectRelationFilter($contact, 'equals', $newProject);
 }