Added PHPUnit tests for search method