BlockTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 8
c 1
b 1
f 0
dl 0
loc 28
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A filterProvider() 0 4 1
A testFilter() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Website\Grid\Filters;
6
7
use PHPUnit\Framework\TestCase;
8
9
class BlockTest 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 Block($intents, $attributes, $tag);
31
32
        $html = (string)$sut;
33
34
        $this->assertStringContainsString('<div class="hidable">', $html);
35
        $this->assertStringContainsString('filter-identifier', $html);
36
        $this->assertStringContainsString('filter-title', $html);
37
    }
38
}
39