Skip to content

Commit

Permalink
Restore test
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe committed Feb 15, 2025
1 parent d669758 commit 5f6554e
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static function providesBulkActionMethodsToTest(): array
'BulkActionsThAttributes',
'BulkActionsThCheckboxAttributes',
'BulkActionsTdAttributes',
'BulkActionsTdCheckboxAttributes',
'BulkActionsRowButtonAttributes',
];
}
Expand Down Expand Up @@ -77,7 +78,7 @@ public function test_can_set_bulk_actions_attributes_via_provider(string $setMet
'default' => $default,
'default-colors' => $defaultColors,
'default-styling' => $defaultStyling,
], $this->basicTable->{$getMethod}());
], collect($this->basicTable->{$getMethod}())->only(['class','default','default-colors','default-styling'])->toArray());

$this->basicTable->{$setMethod}([
'default' => $default,
Expand All @@ -91,7 +92,7 @@ public function test_can_set_bulk_actions_attributes_via_provider(string $setMet
'default' => $default,
'default-colors' => ! $defaultColors,
'default-styling' => $defaultStyling,
], $this->basicTable->{$getMethod}());
], collect($this->basicTable->{$getMethod}())->only(['class','default','default-colors','default-styling'])->toArray());
}

#[DataProvider('bulkActionAttributesProvider')]
Expand All @@ -106,7 +107,7 @@ public function test_can_get_bulk_actions_attributes_bag_via_provider(string $se

$this->basicTable->{$setMethod}($data);

$this->assertSame($data, $this->basicTable->{$getMethod}());
$this->assertSame($data, collect($this->basicTable->{$getMethod}())->only(['class','default','default-colors','default-styling'])->toArray());

$attributeBag = new ComponentAttributeBag($data);

Expand All @@ -131,8 +132,10 @@ public function test_bulk_actions_td_checkbox_attributes_returns_default_true_if
'default-styling' => false,
];
ksort($data);

$this->assertSame($data, $this->basicTable->getBulkActionsTdCheckboxAttributes());
$returnedData = $this->basicTable->getBulkActionsTdCheckboxAttributes();
ksort($returnedData);

$this->assertSame($data, $returnedData);
}

public function test_bulk_actions_th_attributes_returns_default_true_if_not_set(): void
Expand Down

0 comments on commit 5f6554e

Please sign in to comment.