You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
758 B
40 lines
758 B
8 years ago
|
<?php
|
||
|
|
||
|
namespace yiiunit\extensions\bootstrap;
|
||
|
|
||
|
use yii\bootstrap\Modal;
|
||
|
|
||
|
/**
|
||
|
* @group bootstrap
|
||
|
*/
|
||
|
class ModalTest extends TestCase
|
||
|
{
|
||
|
public function testBodyOptions()
|
||
|
{
|
||
|
$out = Modal::widget([
|
||
|
'bodyOptions' => ['class' => 'modal-body test', 'style' => 'text-align:center;']
|
||
|
]);
|
||
|
|
||
|
|
||
|
$expected = <<<EXPECTED
|
||
|
|
||
|
<div id="w1" class="fade modal" role="dialog" tabindex="-1">
|
||
|
<div class="modal-dialog ">
|
||
|
<div class="modal-content">
|
||
|
<div class="modal-header">
|
||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
|
|
||
|
</div>
|
||
|
<div class="modal-body test" style="text-align:center;">
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
EXPECTED;
|
||
|
|
||
|
$this->assertEqualsWithoutLE($expected, $out);
|
||
|
}
|
||
|
}
|