Skip to content

Commit

Permalink
Adjust SessionStorageHelpersTest (#2065)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored Nov 17, 2024
1 parent c5a3a1d commit eec8385
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/Unit/Traits/Helpers/SessionStorageHelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public function test_can_store_for_fikers(): void

$this->basicTable->setFilter('breed', ['1']);
$this->assertSame(['1'], $this->basicTable->getAppliedFilterWithValue('breed'));
$this->assertSame(['breed' => ['1']], $this->basicTable->appliedFilters);
$this->assertSame(['breed' => ['1']], $this->basicTable->filterComponents);
$this->assertSame(['breed' => ['1']], $this->basicTable->getStoredFilterValues());

$this->basicTable->setFilter('breed', ['2']);
$this->assertSame(['breed' => ['2']], $this->basicTable->appliedFilters);
$this->assertSame(['breed' => ['2']], $this->basicTable->filterComponents);
$this->assertSame(['2'], $this->basicTable->getAppliedFilterWithValue('breed'));
$this->assertSame(['breed' => ['2']], $this->basicTable->getStoredFilterValues());

Expand All @@ -53,17 +53,16 @@ public function test_can_store_for_fikers(): void
$this->assertSame(['breed' => ['3']], $this->basicTable->getStoredFilterValues());
$this->assertSame(['3'], $this->basicTable->getAppliedFilterWithValue('breed'));

$this->basicTable->appliedFilters = $this->basicTable->filterComponents = ['breed' => ['4']];
$this->basicTable->setFilter('breed', ['4']);
$this->basicTable->storeFilterValues();
$this->assertSame(['4'], $this->basicTable->getAppliedFilterWithValue('breed'));

$this->basicTable->appliedFilters = $this->basicTable->filterComponents = [];
$this->basicTable->filterComponents = [];
$this->assertNull($this->basicTable->getAppliedFilterWithValue('breed'));
$this->assertSame([], $this->basicTable->appliedFilters);
$this->assertSame([], $this->basicTable->filterComponents);

$this->basicTable->restoreFilterValues();
$this->assertSame(['breed' => ['4']], $this->basicTable->appliedFilters);
$this->assertSame(['breed' => ['4']], $this->basicTable->filterComponents);
$this->assertSame(['4'], $this->basicTable->getAppliedFilterWithValue('breed'));
$this->assertSame(['breed' => ['4']], $this->basicTable->getStoredFilterValues());

Expand Down

0 comments on commit eec8385

Please sign in to comment.