1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
<?php
use function Termwind\parse;
it('renders the element', function () {
$html = parse('<div>text</div>');
expect($html)->toBe('text');
});
it('renders the element with display block as default', function () {
$html = parse(<<<'HTML'
<div>
<div>First line</div>
<div>Second Line</div>
</div>
HTML
);
expect($html)->toBe("First line\nSecond Line");
});
it('renders the element with display block [one empty]', function () {
$html = parse(<<<'HTML'
<div>
<div></div>
<div>Second Line</div>
</div>
HTML
);
expect($html)->toBe("\nSecond Line");
});
|