public function testDeletingCustomNewsCategoryWithPosts() { $news = News::addNews(StringMocks::SampleTitleOne, StringMocks::LargeContent, $this->player_with_create_perms->getId(), $this->newsCategory->getId()); $this->assertArrayLengthEquals($this->newsCategory->getNews(), 1); $this->newsCategory->delete(); $this->assertEquals('enabled', $this->newsCategory->getStatus()); $this->assertArrayContainsModel($this->newsCategory, NewsCategory::getCategories()); $this->wipe($news); }
/** * @return Category[] */ public function getCategoryDefinitions() { return NewsCategory::getCategories($this->categoryUrl); }
/** @return String **/ public function getCategories() { if (empty($this->categories)) { $xh = $this->getFullNewsXML(); $this->categories = NewsCategory::getCategories($xh->getHrefValue(CATEGORIES)); } return $this->categories; }
/** * @return Category[] */ public function getCategoryDefinitions() { JLog::add('load category definitions with.' . $this->categoryUrl, JLog::INFO, 'com_braftonarticles'); return NewsCategory::getCategories($this->categoryUrl); }