Exemple #1
0
 public function testClassListSpread()
 {
     $decorator = new Decorator\HtmlTag();
     $decorator->setClassList(array('small', 'medium', 'large'));
     $expected = array('<li><a href="http://first" class="small">foo</a></li>', '<li><a href="http://second" class="medium">bar</a></li>', '<li><a href="http://third" class="large">baz</a></li>');
     $this->assertEquals($decorator->render($this->_getTagList()), $expected);
 }
Exemple #2
0
 /**
  * @dataProvider invalidAttributeProvider
  */
 public function testInvalidAttributesRaiseAnException($tags)
 {
     $decorator = new Decorator\HtmlTag();
     $decorator->setHTMLTags($tags);
     $this->setExpectedException('Zend\\Tag\\Exception\\InvalidAttributeNameException');
     $decorator->render($this->getTags());
 }