/** * Helper function for the Element nodes * * @param array $attributes * @return string */ public function renderAttr(array $attributes) { $helper = new Attributes($attributes, $this->escape); return $helper->toString(); }
public function testRender() { $attr = new Attributes(['href' => '#', 'data-special' => "123"]); $exp = ' href="#" data-special="123"'; $this->assertEquals($exp, $attr->toString()); }