/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/View/Blade/BladeStyleTest.php
14 строк
610 B
Craig Anderson
[9.x] Add @style Blade directive (#45887)
01 фев 2023, 06:39
Не верифицирован
01 фев 2023, 06:39
fb6c591
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\View\Blade; class BladeStyleTest extends AbstractBladeTestCase { public function testStylesAreConditionallyCompiledFromArray() { $string = "<span @style(['font-weight: bold', 'text-decoration: underline', 'color: red' => true, 'margin-top: 10px' => false])></span>"; $expected = "<span style=\"<?php echo \Illuminate\Support\Arr::toCssStyles(['font-weight: bold', 'text-decoration: underline', 'color: red' => true, 'margin-top: 10px' => false]) ?>\"></span>"; $this->assertEquals($expected, $this->compiler->compileString($string)); } }