public function testLabel() { $button = new Button(); $button->setLabel('My label'); $this->assertEquals('My label', $button->getLabel()); $html = '<a href="#" class="btn">My label</a>'; $this->assertEquals($html, $button->toHtml([])); }
public function testColumnLabelAndToHtml() { $col = $this->getMockForAbstractClass('ZfcDatagrid\\Column\\AbstractColumn'); $col->setUniqueId('myCol'); $button = new Button(); $button->setLabel($col); $this->assertInstanceOf('ZfcDatagrid\\Column\\AbstractColumn', $button->getLabel()); $html = '<a href="#" class="btn btn-default">Blubb</a>'; $this->assertEquals($html, $button->toHtml(['myCol' => 'Blubb'])); }