['class' => 'toast-body test', 'style' => ['text-align' => 'center']]
]);
$expected = <<
HTML;
$this->assertEqualsWithoutLE($expected, $out);
}
/**
*/
public function testContainerOptions()
{
Toast::$counter = 0;
ob_start();
Toast::begin([
'title' => 'Toast title',
'dateTime' => time() - 60
]);
echo 'Woohoo, you\'re reading this text in a toast!';
Toast::end();
$out = ob_get_clean();
$expected = <<
Woohoo, you're reading this text in a toast!
HTML;
$this->assertEqualsWithoutLE($expected, $out);
}
public function testDateTimeOptions()
{
Toast::$counter = 0;
$out = Toast::widget([
'title' => 'Toast title',
'dateTime' => time() - 60,
'dateTimeOptions' => ['class' => ['toast-date-time'], 'style' => ['text-align' => 'right']]
]);
$expected = <<
HTML;
$this->assertEqualsWithoutLE($expected, $out);
}
public function testTitleOptions()
{
Toast::$counter = 0;
$out = Toast::widget([
'title' => 'Toast title',
'titleOptions' => ['tag' => 'h5', 'style' => ['text-align' => 'left']]
]);
$expected = <<
HTML;
$this->assertEqualsWithoutLE($expected, $out);
}
}