UserTest::testFilter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 9
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Admin\Grid\Filters;
6
7
use PHPUnit\Framework\TestCase;
8
9
class UserTest extends TestCase
10
{
11
    /**
12
     * @return array
13
     */
14
    public function filterProvider(): array
15
    {
16
        return [
17
            [[], [], null],
18
        ];
19
    }
20
21
    /**
22
     * @dataProvider filterProvider
23
     *
24
     * @param string[]    $intents
25
     * @param array       $attributes
26
     * @param string|null $tag
27
     */
28
    public function testFilter(array $intents, array $attributes, ?string $tag)
29
    {
30
        $sut = new User($intents, $attributes, $tag);
31
32
        $html = (string)$sut;
33
34
        $this->assertStringContainsString('<div class="hideable">', $html);
35
        $this->assertStringContainsString('filter-username', $html);
36
        $this->assertStringContainsString('filter-email', $html);
37
    }
38
}
39