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 @@ -54,6 +54,11 @@ public static function camelCaseFilter(): callable
5454 return new LowerCaseFirst (self ::normalizeFilter ());
5555 }
5656
57+ public static function pascalCaseFilter (): callable
58+ {
59+ return new UpperCaseFirst (self ::normalizeFilter ());
60+ }
61+
5762 /**
5863 * Returns a filter for valid class names e.g. AddBuilding
5964 *
Original file line number Diff line number Diff line change @@ -47,6 +47,17 @@ public function it_filters_camel_case(string $label): void
4747 $ this ->assertSame ('addBuilding ' , ($ filter )($ label ));
4848 }
4949
50+ /**
51+ * @test
52+ * @dataProvider providerForLabel
53+ * @param string $label
54+ */
55+ public function it_filters_pascal_case (string $ label ): void
56+ {
57+ $ filter = FilterFactory::pascalCaseFilter ();
58+ $ this ->assertSame ('AddBuilding ' , ($ filter )($ label ));
59+ }
60+
5061 /**
5162 * @test
5263 * @dataProvider providerForLabel
You can’t perform that action at this time.
0 commit comments