diff --git a/lib/TraackrApi/Posts.php b/lib/TraackrApi/Posts.php index 0c06d60..8f7953e 100644 --- a/lib/TraackrApi/Posts.php +++ b/lib/TraackrApi/Posts.php @@ -71,11 +71,6 @@ public static function search($p = array( $p['include_brand_content'] = $posts->convertBool($p, 'include_brand_content'); $p['include_shared_content'] = $posts->convertBool($p, 'include_shared_content'); - // Validate business requirements - if ( $p['enable_keyword_aggregation'] === 'true' && $p['include_keyword_matches'] === 'false' ) { - throw new MissingParameterException("'include_keyword_matches' needs to be set to true for 'keyword_aggregation' to work"); - } - // support for multi params $p['keywords'] = is_array($p['keywords']) ? implode(',', $p['keywords']) : $p['keywords']; diff --git a/test/Posts/PostsTest.php b/test/Posts/PostsTest.php index b6be6e5..9e08518 100644 --- a/test/Posts/PostsTest.php +++ b/test/Posts/PostsTest.php @@ -43,11 +43,12 @@ public function testLookup() { * @expectedException Traackr\MissingParameterException */ public function testSearchInvalidParameter() { - Traackr\Posts::search(array( + $posts = Traackr\Posts::search(array( 'keywords' => array('traackr', '"content marketing"'), 'include_keyword_matches' => false, 'enable_keyword_aggregation' => true )); + $this->assertGreaterThan(0, $posts['posts'], 'No results found'); } /**