public function testGetArticle() { $site = 'ent'; $news_id = util_genId(1); $article = $this->tagsController->getArticle($site, $news_id); $this->assertEquals($article['Ftitle'], '娱乐-标题2'); $this->assertEquals($article['Ftype'], 0); $this->assertEquals($article['Fpub_time'], util_datetime(8)); }
public function testGetArticle() { $site_id = TagSite::getSiteId('ent'); $news_id = util_genId(1); $article = ArticleMini::model()->getArticle($site_id, $news_id); $this->assertEquals($article['Ftitle'], '娱乐-标题2'); $this->assertEquals($article['Ftype'], 0); $this->assertEquals($article['Fpub_time'], util_datetime(8)); }
<?php $rows = array(array('Fsite_id' => TagSite::getSiteId('news'), 'Farticle_id' => util_genId(1), 'Ftitle' => '新闻-标题1', 'Ftype' => 0, 'Fpub_time' => util_datetime(9)), array('Fsite_id' => TagSite::getSiteId('ent'), 'Farticle_id' => util_genId(1), 'Ftitle' => '娱乐-标题2', 'Ftype' => 0, 'Fpub_time' => util_datetime(8)), array('Fsite_id' => TagSite::getSiteId('news'), 'Farticle_id' => util_genId(3), 'Ftitle' => '新闻-标题2', 'Ftype' => 0, 'Fpub_time' => util_datetime(7))); return $rows;