generated from yii-tools/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
SpanTest.php
35 lines (29 loc) · 854 Bytes
/
SpanTest.php
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
34
35
<?php
declare(strict_types=1);
namespace Forge\Html\Tests\Tag;
use Forge\Html\Tag\Tag;
use Forge\TestUtils\Assert;
use PHPUnit\Framework\TestCase;
final class SpanTest extends TestCase
{
public function createProvider(): array
{
return [
[[], '', '<span></span>'],
[['class' => 'class'], '', '<span class="class"></span>'],
[[], 'Content', '<span>Content</span>'],
];
}
/**
* @dataProvider createProvider
*
* @param array $attributes Tag attributes.
* @param string $content Tag content.
* @param string $expected Expected result.
*/
public function testCreate(array $attributes, string $content, string $expected): void
{
$assert = new Assert();
$assert->equalsWithoutLE($expected, Tag::span($attributes, $content));
}
}