-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathTablerExtensionTest.php
More file actions
41 lines (36 loc) · 1.3 KB
/
TablerExtensionTest.php
File metadata and controls
41 lines (36 loc) · 1.3 KB
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
36
37
38
39
40
41
<?php
/*
* This file is part of the Tabler bundle, created by Kevin Papst (www.kevinpapst.de).
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace KevinPapst\TablerBundle\Tests\Twig;
use KevinPapst\TablerBundle\Twig\TablerExtension;
use PHPUnit\Framework\TestCase;
/**
* @covers \KevinPapst\TablerBundle\Twig\TablerExtension
*/
class TablerExtensionTest extends TestCase
{
public function testGetFilters(): void
{
$expected = ['tabler_container', 'tabler_body', 'tabler_route'];
$sut = new TablerExtension();
$this->assertCount(\count($expected), $sut->getFilters());
$result = array_map(function ($filter) {
return $filter->getName();
}, $sut->getFilters());
$this->assertEquals($expected, $result);
}
public function testGetFunctions(): void
{
$expected = ['tabler_menu', 'tabler_notifications', 'tabler_theme', 'tabler_unique_id', 'tabler_user'];
$sut = new TablerExtension();
$this->assertCount(\count($expected), $sut->getFunctions());
$result = array_map(function ($function) {
return $function->getName();
}, $sut->getFunctions());
$this->assertEquals($expected, $result);
}
}