コード例 #1
0
ファイル: SitemapTest.php プロジェクト: jsnshrmn/Suma
 /**
  * @group ZF-8874
  */
 public function testRenderingWithoutWhitespace()
 {
     // Reset format output option
     $this->_helper->setFormatOutput(false);
     $expected = $this->_helper->render();
     $actual = $this->_getExpected('sitemap/without_whitespace.xml');
     $this->assertEquals($expected, $actual);
 }
コード例 #2
0
ファイル: SitemapTest.php プロジェクト: travisj/zf
 public function testUseSchemaValidation()
 {
     $this->markTestSkipped('Skipped because it fetches XSD from web');
     return;
     $nav = clone $this->_nav2;
     $this->_helper->setUseSitemapValidators(false);
     $this->_helper->setUseSchemaValidation(true);
     $nav->addPage(array('label' => 'Invalid', 'uri' => 'http://w.'));
     try {
         $this->_helper->render($nav);
     } catch (Zend_View_Exception $e) {
         $expected = sprintf('Sitemap is invalid according to XML Schema at "%s"', Zend_View_Helper_Navigation_Sitemap::SITEMAP_XSD);
         $actual = $e->getMessage();
         $this->assertEquals($expected, $actual);
         return;
     }
     $this->fail('A Zend_View_Exception was not thrown when using Schema validation');
 }