File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1818 "require" : {
1919 "php" : " ^8.0" ,
2020 "illuminate/contracts" : " ^9.7" ,
21- "michael-rubel/laravel-formatters" : " ^6.3|^ 7.0" ,
21+ "michael-rubel/laravel-formatters" : " ^7.0.4 " ,
2222 "phpmath/bignumber" : " ^1.2" ,
2323 "spatie/laravel-package-tools" : " ^1.12"
2424 },
Original file line number Diff line number Diff line change 5151 $ this ->assertSame ('Le Poidevin ' , $ name ->lastName ());
5252});
5353
54+ test ('full name covnerts the first letter of each word to uppercase ' , function ($ input , $ result ) {
55+ $ name = new FullName ($ input );
56+ $ this ->assertSame ($ result , $ name ->fullName ());
57+ })->with ([
58+ ['michael mcKenzie ' , 'Michael McKenzie ' ],
59+ ['michael McKenzie ' , 'Michael McKenzie ' ],
60+ ['Michael mcKenzie ' , 'Michael McKenzie ' ],
61+ ['Michael McKenzie ' , 'Michael McKenzie ' ],
62+ ['michael mckenzie ' , 'Michael Mckenzie ' ],
63+ ['michael mc-kenzie ' , 'Michael Mc-kenzie ' ],
64+ [' michael mc-Kenzie ' , 'Michael Mc-Kenzie ' ],
65+ ]);
66+
5467test ('can get cast to string ' , function () {
5568 $ name = new FullName ('Michael Rubél ' );
5669 $ this ->assertSame ('Michael Rubél ' , (string ) $ name );
You can’t perform that action at this time.
0 commit comments