77use PHPUnit \Framework \TestCase ;
88use Steevanb \PhpCollection \KeyCaseEnum ;
99
10+ /** @covers \Steevanb\PhpCollection\AbstractCollection::changeKeyCase */
1011final class ChangeKeyCaseTest extends TestCase
1112{
1213 public function testDefaultParameters (): void
1314 {
14- $ collection = new Collection (['foo ' => 1 ]);
15+ $ collection = new TestCollection (['foo ' => 1 ]);
1516
1617 $ collection ->changeKeyCase ();
1718
@@ -22,7 +23,7 @@ public function testDefaultParameters(): void
2223
2324 public function testLowerCaseAssociativesKeys (): void
2425 {
25- $ collection = new Collection (['foo ' => 1 , 'BaR ' => 2 , 'BAZ ' => 3 ]);
26+ $ collection = new TestCollection (['foo ' => 1 , 'BaR ' => 2 , 'BAZ ' => 3 ]);
2627
2728 $ collection ->changeKeyCase (KeyCaseEnum::LOWER );
2829
@@ -37,7 +38,7 @@ public function testLowerCaseAssociativesKeys(): void
3738
3839 public function testUpperCaseAssociativesKeys (): void
3940 {
40- $ collection = new Collection (['foo ' => 1 , 'BaR ' => 2 , 'BAZ ' => 3 ]);
41+ $ collection = new TestCollection (['foo ' => 1 , 'BaR ' => 2 , 'BAZ ' => 3 ]);
4142
4243 $ collection ->changeKeyCase (KeyCaseEnum::UPPER );
4344
@@ -52,7 +53,7 @@ public function testUpperCaseAssociativesKeys(): void
5253
5354 public function testLowerCaseIndexedKeys (): void
5455 {
55- $ collection = new Collection ([0 => 1 , 10 => 2 , 20 => 3 ]);
56+ $ collection = new TestCollection ([0 => 1 , 10 => 2 , 20 => 3 ]);
5657
5758 $ collection ->changeKeyCase (KeyCaseEnum::LOWER );
5859
@@ -67,7 +68,7 @@ public function testLowerCaseIndexedKeys(): void
6768
6869 public function testUpperCaseIndexedKeys (): void
6970 {
70- $ collection = new Collection ([0 => 1 , 10 => 2 , 20 => 3 ]);
71+ $ collection = new TestCollection ([0 => 1 , 10 => 2 , 20 => 3 ]);
7172
7273 $ collection ->changeKeyCase (KeyCaseEnum::UPPER );
7374
@@ -82,19 +83,12 @@ public function testUpperCaseIndexedKeys(): void
8283
8384 public function testEmpty (): void
8485 {
85- $ collection = new Collection ();
86+ $ collection = new TestCollection ();
8687
8788 static ::assertCount (0 , $ collection );
8889
8990 $ collection ->changeKeyCase ();
9091
9192 static ::assertCount (0 , $ collection );
9293 }
93-
94- public function testReturnType (): void
95- {
96- $ collection = new Collection ();
97-
98- static ::assertSame ($ collection , $ collection ->changeKeyCase ());
99- }
10094}
0 commit comments