Skip to content

Commit

Permalink
Add test for list filter operator LIKE
Browse files Browse the repository at this point in the history
  • Loading branch information
alterphp committed Feb 22, 2019
1 parent 8a4b70b commit 4f32d54
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Controller/ListFormFiltersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,21 @@ public function testListFilterNotInOperator()
);
}

public function testListFilterLikeOperator()
{
$crawler = $this->requestListView(
'Product',
[],
['referenceLike' => ['value' => 'ref00001']]
);

$this->assertSame(200, $this->client->getResponse()->getStatusCode());
$this->assertContains(
'10 results',
$crawler->filter('section.content-footer .list-pagination-counter')->text()
);
}

public function testListFilterCombinedOperator()
{
$crawler = $this->requestListView(
Expand Down
1 change: 1 addition & 0 deletions tests/Fixtures/App/config/config_list_form_filters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ easy_admin:
'0123456789-7': '0123456789-7'
'0123456789-8': '0123456789-8'
'0123456789-9': '0123456789-9'
- { name: referenceLike, property: reference, type: text, operator: like }

0 comments on commit 4f32d54

Please sign in to comment.