File: div.php

package info (click to toggle)
php-nunomaduro-termwind 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,172 kB
  • sloc: php: 3,969; makefile: 34
file content (33 lines) | stat: -rw-r--r-- 674 bytes parent folder | download
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");
});