Skip to content

Commit

Permalink
Add short named array
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored Jul 27, 2024
1 parent 5c29da3 commit a2af4b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/Views/Filters/DateRangeFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,16 @@ public function test_can_set_default_value_by_named_array(): void

}

public function test_can_set_default_value_by_short_named_array(): void
{
$filter = DateRangeFilter::make('Active');
$this->assertFalse($filter->hasFilterDefaultValue());
$filter->setFilterDefaultValue(['min' => '2024-05-04', 'max' => '2024-06-04']);
$this->assertTrue($filter->hasFilterDefaultValue());
$this->assertSame(['minDate' => '2024-05-04', 'maxDate' => '2024-06-04'], $filter->getFilterDefaultValue());

Check failure on line 428 in tests/Views/Filters/DateRangeFilterTest.php

View workflow job for this annotation

GitHub Actions / PULL PHP-8.1 - Laravel-10

Failed asserting that two arrays are identical.

Check failure on line 428 in tests/Views/Filters/DateRangeFilterTest.php

View workflow job for this annotation

GitHub Actions / PCOV - ubuntu-latest - P8.3 - L10 - prefer-dist

Failed asserting that two arrays are identical.

Check failure on line 428 in tests/Views/Filters/DateRangeFilterTest.php

View workflow job for this annotation

GitHub Actions / PULL PHP-8.2 - Laravel-11

Failed asserting that two arrays are identical.

Check failure on line 428 in tests/Views/Filters/DateRangeFilterTest.php

View workflow job for this annotation

GitHub Actions / PULL PHP-8.2 - Laravel-10

Failed asserting that two arrays are identical.

Check failure on line 428 in tests/Views/Filters/DateRangeFilterTest.php

View workflow job for this annotation

GitHub Actions / PULL PHP-8.3 - Laravel-11

Failed asserting that two arrays are identical.

Check failure on line 428 in tests/Views/Filters/DateRangeFilterTest.php

View workflow job for this annotation

GitHub Actions / PULL PHP-8.3 - Laravel-10

Failed asserting that two arrays are identical.

}

public function test_can_set_default_value_by_numbered_array(): void
{
$filter = DateRangeFilter::make('Active');
Expand Down

0 comments on commit a2af4b1

Please sign in to comment.