File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ public static function snakeCaseFilter(): callable
4949 );
5050 }
5151
52+ public static function camelCaseFilter (): callable
53+ {
54+ return new LowerCaseFirst (self ::normalizeFilter ());
55+ }
56+
5257 /**
5358 * Returns a filter for valid class names e.g. AddBuilding
5459 *
Original file line number Diff line number Diff line change @@ -36,6 +36,17 @@ public function it_filters_snake_case(string $label): void
3636 $ this ->assertSame ('add_building ' , ($ filter )($ label ));
3737 }
3838
39+ /**
40+ * @test
41+ * @dataProvider providerForLabel
42+ * @param string $label
43+ */
44+ public function it_filters_camel_case (string $ label ): void
45+ {
46+ $ filter = FilterFactory::camelCaseFilter ();
47+ $ this ->assertSame ('addBuilding ' , ($ filter )($ label ));
48+ }
49+
3950 /**
4051 * @test
4152 * @dataProvider providerForLabel
You can’t perform that action at this time.
0 commit comments