File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -114,4 +114,26 @@ public function test_cannot_collapse_on_tablet_and_mobile(): void
114114
115115 $ contents = $ column ->renderContents ($ rows ->first ());
116116 }
117+
118+ public function test_custom_sorting_pills_defaults_correctly (): void
119+ {
120+ $ column = Column::make ('Name ' , 'name ' );
121+ $ defaultString = __ ($ this ->basicTable ->getLocalisationPath ().'not_applicable ' );
122+
123+ $ this ->assertSame ('A-Z ' , $ column ->getCustomSortingPillDirections ('asc ' ));
124+ $ this ->assertSame ('Z-A ' , $ column ->getCustomSortingPillDirections ('desc ' ));
125+ $ this ->assertSame ($ defaultString , $ column ->getCustomSortingPillDirections ('faulty_string ' ));
126+
127+ }
128+
129+ public function test_custom_sorting_pills_label_defaults_correctly (): void
130+ {
131+ $ column = Column::make ('Name ' , 'name ' );
132+ $ defaultString = __ ($ this ->basicTable ->getLocalisationPath ().'not_applicable ' );
133+
134+ $ this ->assertSame ('A-Z ' , $ column ->getCustomSortingPillDirectionsLabel ('asc ' ));
135+ $ this ->assertSame ('Z-A ' , $ column ->getCustomSortingPillDirectionsLabel ('desc ' ));
136+ $ this ->assertSame ($ defaultString , $ column ->getCustomSortingPillDirectionsLabel ('faulty_string ' ));
137+
138+ }
117139}
You can’t perform that action at this time.
0 commit comments