/** * @param string $title * @return $this */ public function withTitle($title) { $this->uiElement->addTitle($title); return $this; }
public function testAddTitle() { $tag = new Alert('foo'); $tag->addTitle('bar'); $this->assertEquals('<div class="alert alert-info">' . '<strong>bar</strong>' . '<button type="button" data-dismiss="alert" aria-hidden="true">×</button>' . 'foo' . '</div>', $tag->getHTML()); }