Total Complexity | 5 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class GroupKeywordTest extends TestCase |
||
12 | { |
||
13 | public function testBuildNone(): void |
||
14 | { |
||
15 | $this->assertEquals( |
||
16 | '', |
||
17 | GroupKeyword::build([]) |
||
18 | ); |
||
19 | } |
||
20 | |||
21 | public function testBuildOne(): void |
||
22 | { |
||
23 | $this->assertEquals( |
||
24 | 'a', |
||
25 | GroupKeyword::build( |
||
26 | new GroupKeyword(new Expression('a')) |
||
27 | ) |
||
28 | ); |
||
29 | } |
||
30 | |||
31 | public function testBuildMany(): void |
||
32 | { |
||
33 | $this->assertEquals( |
||
34 | 'a, b, c', |
||
35 | GroupKeyword::build( |
||
36 | [ |
||
37 | new GroupKeyword(new Expression('a')), |
||
38 | new GroupKeyword(new Expression('b')), |
||
39 | new GroupKeyword(new Expression('c')), |
||
40 | ] |
||
41 | ) |
||
42 | ); |
||
43 | } |
||
44 | |||
45 | public function testBuildUntrimmedSingleExpression(): void |
||
46 | { |
||
47 | $this->assertEquals( |
||
48 | 'o', |
||
49 | GroupKeyword::build( |
||
50 | new GroupKeyword(new Expression(' o ')) |
||
51 | ) |
||
52 | ); |
||
53 | } |
||
54 | |||
55 | public function testBuildUntrimmedExpressions(): void |
||
64 | ] |
||
65 | ) |
||
66 | ); |
||
67 | } |
||
68 | } |
||
69 |