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 @@ -54,6 +54,11 @@ public static function camelCaseFilter(): callable
54
54
return new LowerCaseFirst (self ::normalizeFilter ());
55
55
}
56
56
57
+ public static function pascalCaseFilter (): callable
58
+ {
59
+ return new UpperCaseFirst (self ::normalizeFilter ());
60
+ }
61
+
57
62
/**
58
63
* Returns a filter for valid class names e.g. AddBuilding
59
64
*
Original file line number Diff line number Diff line change @@ -47,6 +47,17 @@ public function it_filters_camel_case(string $label): void
47
47
$ this ->assertSame ('addBuilding ' , ($ filter )($ label ));
48
48
}
49
49
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
+
50
61
/**
51
62
* @test
52
63
* @dataProvider providerForLabel
You can’t perform that action at this time.
0 commit comments