Пример #1
0
 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 (View\Exception\ExceptionInterface $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\\InvalidArgumentException was not thrown when using Schema validation');
 }