|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the core-bundle package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) 2019 WEBEWEB |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace WBW\Bundle\CoreBundle\Tests\Icon\FontAwesome; |
|
13
|
|
|
|
|
14
|
|
|
use WBW\Bundle\CoreBundle\Icon\FontAwesome\FontAwesomeIconEnumerator; |
|
15
|
|
|
use WBW\Bundle\CoreBundle\Icon\FontAwesome\FontAwesomeIconInterface; |
|
16
|
|
|
use WBW\Bundle\CoreBundle\Tests\AbstractTestCase; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Font Awesome icon enumerator test. |
|
20
|
|
|
* |
|
21
|
|
|
* @author webeweb <https://github.com/webeweb/> |
|
22
|
|
|
* @package WBW\Bundle\CoreBundle\Tests\Icon\FontAwesome |
|
23
|
|
|
*/ |
|
24
|
|
|
class FontAwesomeIconEnumeratorTest extends AbstractTestCase { |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* Tests the enumAnimations() method. |
|
28
|
|
|
* |
|
29
|
|
|
* @return void |
|
30
|
|
|
*/ |
|
31
|
|
|
public function testEnumAnimations(): void { |
|
32
|
|
|
|
|
33
|
|
|
$res = [ |
|
34
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_ANIMATION_PULSE, |
|
35
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_ANIMATION_SPIN, |
|
36
|
|
|
]; |
|
37
|
|
|
$this->assertEquals($res, FontAwesomeIconEnumerator::enumAnimations()); |
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* Tests the enumFonts() method. |
|
42
|
|
|
* |
|
43
|
|
|
* @return void |
|
44
|
|
|
*/ |
|
45
|
|
|
public function testEnumFonts(): void { |
|
46
|
|
|
|
|
47
|
|
|
$res = [ |
|
48
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_FONT, |
|
49
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_FONT_BOLD, |
|
50
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_FONT_LIGHT, |
|
51
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_FONT_REGULAR, |
|
52
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_FONT_SOLID, |
|
53
|
|
|
]; |
|
54
|
|
|
$this->assertEquals($res, FontAwesomeIconEnumerator::enumFonts()); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* Tests the enumPulls() method. |
|
59
|
|
|
* |
|
60
|
|
|
* @return void |
|
61
|
|
|
*/ |
|
62
|
|
|
public function testEnumPulls(): void { |
|
63
|
|
|
|
|
64
|
|
|
$res = [ |
|
65
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_PULL_LEFT, |
|
66
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_PULL_RIGHT, |
|
67
|
|
|
]; |
|
68
|
|
|
$this->assertEquals($res, FontAwesomeIconEnumerator::enumPulls()); |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* Tests the enumSizes() mmethod. |
|
73
|
|
|
* |
|
74
|
|
|
* @return void |
|
75
|
|
|
*/ |
|
76
|
|
|
public function testEnumSizes(): void { |
|
77
|
|
|
|
|
78
|
|
|
$res = [ |
|
79
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_LG, |
|
80
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_SM, |
|
81
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_XS, |
|
82
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_2X, |
|
83
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_3X, |
|
84
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_4X, |
|
85
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_5X, |
|
86
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_6X, |
|
87
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_7X, |
|
88
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_8X, |
|
89
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_9X, |
|
90
|
|
|
FontAwesomeIconInterface::FONT_AWESOME_SIZE_10X, |
|
91
|
|
|
]; |
|
92
|
|
|
$this->assertEquals($res, FontAwesomeIconEnumerator::enumSizes()); |
|
93
|
|
|
} |
|
94
|
|
|
} |
|
95
|
|
|
|