コード例 #1
0
ファイル: SitemapTest.php プロジェクト: NaszvadiG/ImageCMS
 /**
  * @covers Sitemap::sitemap_ul
  */
 public function testSitemap_ul()
 {
     $result = $this->object->sitemap_ul();
     // Check not empty result
     $this->assertNotEmpty($result);
     // Check valid return string
     $this->assertRegExp('/id="sitemap"/', $result);
     // Get categories data for test
     $categories = $this->ci->lib_category->_build();
     $result_categories = $this->object->sitemap_ul($categories);
     // Check correct result
     if (count($categories) > 0) {
         $this->assertRegExp('/id="sitemap"/', $result_categories);
         $this->assertGreaterThan(strlen($result), strlen($result_categories));
     }
 }