Skip to content

Commit fb5df93

Browse files
Update test cases to use available modifiers
- Changed test cases from quote to actual formatters (date, pattern, mask, number) - These modifiers are actually available in the default chain - Tests demonstrate multiple pipes with realistic formatter combinations Co-authored-by: henriquemoody <154023+henriquemoody@users.noreply.github.com>
1 parent c9951e5 commit fb5df93

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tests/Unit/PlaceholderFormatterTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -690,15 +690,10 @@ public function itShouldHandleMultiplePipesInSequence(
690690
public static function providerForMultiplePipes(): array
691691
{
692692
return [
693-
'trans then quote' => [
694-
['name' => 'hello'],
695-
'{{name|trans|quote}}',
696-
'`hello`',
697-
],
698-
'quote then trans (demonstrates order matters)' => [
699-
['name' => 'hello'],
700-
'{{name|quote|trans}}',
701-
'`hello`',
693+
'date then mask' => [
694+
['value' => '2024-01-15'],
695+
'{{value|date:Y/m/d|mask:5-7}}',
696+
'2024***15',
702697
],
703698
'pattern then mask' => [
704699
['phone' => '1234567890'],
@@ -707,13 +702,18 @@ public static function providerForMultiplePipes(): array
707702
],
708703
'number then mask' => [
709704
['value' => '12345'],
710-
'{{value|number:2|mask:1-5}}',
705+
'{{value|number:0|mask:1-5}}',
711706
'*****45',
712707
],
713-
'three pipes: pattern, number, mask' => [
708+
'pattern then number' => [
714709
['value' => '12345'],
715-
'{{value|pattern:###.##|number:2|mask:1-4}}',
716-
'****45',
710+
'{{value|pattern:###.##|number:2}}',
711+
'123.45',
712+
],
713+
'three pipes: pattern, date, mask' => [
714+
['value' => '20240115'],
715+
'{{value|pattern:####-##-##|date:Y/m/d|mask:5-7}}',
716+
'2024***15',
717717
],
718718
];
719719
}

0 commit comments

Comments
 (0)