/** * try to add a note type * */ public function testAddNoteType() { $this->_instance->addNoteType($this->_objects['noteType']); // find our note type $testNoteType = $this->_instance->getNoteTypeByName($this->_objects['noteType']->name); $this->assertEquals($this->_objects['noteType']->name, $testNoteType->name); $this->assertEquals(1, $testNoteType->is_user_type, 'user type not set'); }
/** * try to add a note type * * @return Tinebase_Model_NoteType */ public function testAddNoteType() { $noteType = new Tinebase_Model_NoteType(array('name' => 'phpunit note type', 'icon' => '/images/oxygen/16x16/actions/document-properties.png', 'is_user_type' => TRUE)); $this->_instance->addNoteType($noteType); // read back created note type $testNoteType = $this->_instance->getNoteTypeByName($noteType->name); $this->assertEquals('phpunit note type', $noteType->name); $this->assertEquals(1, $testNoteType->is_user_type, 'user type not set'); return $testNoteType; }