File tree 2 files changed +16
-0
lines changed
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
49
49
);
50
50
}
51
51
52
+ public static function camelCaseFilter (): callable
53
+ {
54
+ return new LowerCaseFirst (self ::normalizeFilter ());
55
+ }
56
+
52
57
/**
53
58
* Returns a filter for valid class names e.g. AddBuilding
54
59
*
Original file line number Diff line number Diff line change @@ -36,6 +36,17 @@ public function it_filters_snake_case(string $label): void
36
36
$ this ->assertSame ('add_building ' , ($ filter )($ label ));
37
37
}
38
38
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
+
39
50
/**
40
51
* @test
41
52
* @dataProvider providerForLabel
You can’t perform that action at this time.
0 commit comments