Ejemplo n.º 1
0
	/**
	 * @param null|int $id
	 * @return bool
	 */
	public function delete( $id = null )
	{
		if ( ( ! $this->_category ) || $id ) {
			return false;
		}

		return $this->_category->delete();
	}
	/**
	 * Test delete()
	 *
	 * @param KunenaForumCategory $category
	 * @depends testRemoveModerator
	 */
	public function testDelete(KunenaForumCategory $category) {
		$this->assertTrue($category->delete(), $category->getError());
		$this->assertFalse($category->exists(), 'Check that deleted category does not exist');
		$this->assertNull($category->id, 'Check that deleted category id is null');
	}