public function testSetDataAttrib() { $tag = new Tag(['tag' => 'div']); $tag->data('foo', 'bar'); $this->assertEquals('bar', $tag->getAttrib('data-foo')); }
/** * * @param string $title * @param string $placement left|right|top|bottom * @return \PhpBootstrap\Html\Tag */ public function tooltip($title, $placement = 'left') { $this->tag->data('toggle', 'tooltip')->data('placement', $placement)->setAttrib('title', $title); return $this; }