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); }
/** * @dataProvider invalidAttributeProvider */ public function testInvalidAttributesRaiseAnException($tags) { $decorator = new Decorator\HtmlTag(); $decorator->setHTMLTags($tags); $this->setExpectedException('Zend\\Tag\\Exception\\InvalidAttributeNameException'); $decorator->render($this->getTags()); }