/** * Test new KunenaForumCategory() * * @return KunenaForumCategory */ public function testNew() { $category = new KunenaForumCategory(); $this->assertNull($category->id, 'Test that new category id is null'); $this->assertFalse($category->exists(), 'Test that new category does not exist'); $this->assertEmpty($category->getChannels(), 'Test that new category has no channels'); $this->assertTrue($category->isSection(), 'Test that new category is section'); $this->assertFalse($category->checkout(JFactory::getUser()), 'Test that new category checkout always fails'); $this->assertFalse($category->isCheckedOut(JFactory::getUser()), 'Test that new category is not checked out after last action'); $this->assertTrue($category->checkin(), 'Test that new category check in always succeeds'); $this->assertTrue($category->delete(), 'Test that deleting new category succeeds'); return $category; }