fix when search service not exists

throw an error when the search service name does not exists.
+ test
This commit is contained in:
2014-12-28 23:45:42 +01:00
parent 13f7dcb00b
commit 0157e90753
3 changed files with 51 additions and 3 deletions

View File

@@ -29,6 +29,14 @@ class SearchProviderTest extends \PHPUnit_Framework_TestCase
$this->search = new SearchProvider();
}
/**
* @expectedException \Chill\MainBundle\Search\UnknowSearchNameException
*/
public function testInvalidSearchName()
{
$this->search->getByName("invalid name");
}
public function testDomain()
{
$term = $this->p("@person is not my name");