File: span.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 (32 lines) | stat: -rw-r--r-- 611 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
<?php

use function Termwind\parse;

it('renders the element', function () {
    $html = parse('<span>text</span>');

    expect($html)->toBe('text');
});

it('empty space shouldn\'t be rendered', function () {
    $html = parse(<<<'HTML'
<div>
    <span class="px-1">hello</span>
    <span class="px-1">world</span>
</div>
HTML
    );

    expect($html)->toBe(' hello  world ');
});

it('sinlge space shouldn\'t be rendered', function () {
    $html = parse(<<<'HTML'
<div>
    <span class="px-1">hello</span> <span class="px-1">world</span>
</div>
HTML
    );

    expect($html)->toBe(' hello   world ');
});