Skip to content

Commit

Permalink
Adjust QueryString Search Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored Oct 27, 2024
1 parent a63bec5 commit f8c82da
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/Traits/Core/QueryStrings/QueryStringForSearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,28 @@ public function configure(): void
$mock->boot();

$this->assertSame('table-search', $mock->getQueryStringAliasForSearch());
$this->assertFalse($mock->hasQueryStringAliasForSearch());
}

public function test_can_change_default_search_query_string_alias(): void
{
$mock = new class extends PetsTable
{
public ?array $testAttributesArray;

public function configure(): void
{
$this->setDataTableFingerprint('test');
}
};

$mock->configure();
$mock->boot();

$this->assertSame('table-search', $mock->getQueryStringAliasForSearch());
$mock->setQueryStringAliasForSearch('pet-search');
$this->assertSame('pet-search', $mock->getQueryStringAliasForSearch());
$this->assertTrue($mock->hasQueryStringAliasForSearch());
}

}

0 comments on commit f8c82da

Please sign in to comment.