Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
III-1955: Add test for unknown facet name in facets url parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
bertramakers committed Apr 10, 2017
1 parent 1df744e commit 0140ea0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/OfferSearchControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,15 @@ public function it_can_handle_a_single_string_value_for_parameters_that_are_norm

$this->controller->search($request);
}

/**
* @test
*/
public function it_throws_an_exception_when_an_unknown_facet_name_is_given()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage("Unknown facet name 'bla'.");
$request = new Request(['facets' => ['region', 'bla']]);
$this->controller->search($request);
}
}

0 comments on commit 0140ea0

Please sign in to comment.