@@ -78,7 +78,7 @@ public function test_can_set_bulk_actions_attributes_via_provider(string $setMet
7878 'default ' => $ default ,
7979 'default-colors ' => $ defaultColors ,
8080 'default-styling ' => $ defaultStyling ,
81- ], $ this ->basicTable ->{$ getMethod }());
81+ ], collect ( $ this ->basicTable ->{$ getMethod }())-> only ([ ' class ' , ' default ' , ' default-colors ' , ' default-styling ' ])-> toArray ());
8282
8383 $ this ->basicTable ->{$ setMethod }([
8484 'default ' => $ default ,
@@ -92,7 +92,7 @@ public function test_can_set_bulk_actions_attributes_via_provider(string $setMet
9292 'default ' => $ default ,
9393 'default-colors ' => ! $ defaultColors ,
9494 'default-styling ' => $ defaultStyling ,
95- ], $ this ->basicTable ->{$ getMethod }());
95+ ], collect ( $ this ->basicTable ->{$ getMethod }())-> only ([ ' class ' , ' default ' , ' default-colors ' , ' default-styling ' ])-> toArray ());
9696 }
9797
9898 #[DataProvider('bulkActionAttributesProvider ' )]
@@ -107,7 +107,7 @@ public function test_can_get_bulk_actions_attributes_bag_via_provider(string $se
107107
108108 $ this ->basicTable ->{$ setMethod }($ data );
109109
110- $ this ->assertSame ($ data , $ this ->basicTable ->{$ getMethod }());
110+ $ this ->assertSame ($ data , collect ( $ this ->basicTable ->{$ getMethod }())-> only ([ ' class ' , ' default ' , ' default-colors ' , ' default-styling ' ])-> toArray ());
111111
112112 $ attributeBag = new ComponentAttributeBag ($ data );
113113
@@ -121,16 +121,31 @@ public function test_bulk_actions_td_attributes_returns_default_true_if_not_set(
121121
122122 public function test_bulk_actions_td_checkbox_attributes_returns_default_true_if_not_set (): void
123123 {
124- $ this ->assertSame (['default ' => true , 'default-colors ' => false , 'default-styling ' => false ], $ this ->basicTable ->getBulkActionsTdCheckboxAttributes ());
124+ $ data = [
125+ 'x-cloak ' ,
126+ 'x-show ' => '!currentlyReorderingStatus ' ,
127+ 'x-model ' => 'selectedItems ' ,
128+ 'wire:loading.attr.delay ' => 'disabled ' ,
129+ 'type ' => 'checkbox ' ,
130+ 'default ' => true ,
131+ 'default-colors ' => false ,
132+ 'default-styling ' => false ,
133+ ];
134+ ksort ($ data );
135+ $ returnedData = $ this ->basicTable ->getBulkActionsTdCheckboxAttributes ();
136+ ksort ($ returnedData );
137+
138+ $ this ->assertSame ($ data , $ returnedData );
125139 }
126140
127141 public function test_bulk_actions_th_attributes_returns_default_true_if_not_set (): void
128142 {
143+
129144 $ this ->assertSame (['default ' => true , 'default-colors ' => false , 'default-styling ' => false ], $ this ->basicTable ->getBulkActionsThAttributes ());
130145 }
131146
132147 public function test_bulk_actions_th_checkbox_attributes_returns_default_true_if_not_set (): void
133148 {
134149 $ this ->assertSame (['default ' => true , 'default-colors ' => false , 'default-styling ' => false ], $ this ->basicTable ->getBulkActionsThCheckboxAttributes ());
135150 }
136- }
151+ }
0 commit comments