badge() public méthode

Returns Bootstrap badge markup. By default, uses .
public badge ( string $text, array $options = [] ) : string
$text string Text to show in badge.
$options array Additional HTML attributes.
Résultat string HTML badge markup.
 public function testBadge()
 {
     $result = $this->Html->badge('foo');
     $expected = ['span' => ['class' => 'badge'], 'foo', '/span'];
     $this->assertHtml($expected, $result);
 }