From 1a3b5b331b0dc8f47b894d5ca9ea7b8a4d1bbfb5 Mon Sep 17 00:00:00 2001 From: Francisc Date: Sat, 9 Sep 2017 18:21:16 +0100 Subject: [PATCH] add some tests --- test/GoogleTest/GTrendsTest.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/GoogleTest/GTrendsTest.php b/test/GoogleTest/GTrendsTest.php index e8e8678..ce9ab78 100644 --- a/test/GoogleTest/GTrendsTest.php +++ b/test/GoogleTest/GTrendsTest.php @@ -110,4 +110,34 @@ public function testIfTrendingSearchesReturnsArray() $this->assertEquals(is_array($trendingSearches), true); } + + public function testIfTopChartsReturnsArray() + { + /* @var $gt GTrends */ + $gt = $this->gt; + + $trendingSearches = $gt->topCharts('201708', 'basketball_players'); + + $this->assertEquals(is_array($trendingSearches), true); + } + + public function testIfSuggestionsAutocompleteReturnsArray() + { + /* @var $gt GTrends */ + $gt = $this->gt; + + $trendingSearches = $gt->suggestionsAutocomplete('Dublin'); + + $this->assertEquals(is_array($trendingSearches), true); + } + + public function testIfInterestBySubregionReturnsArray() + { + /* @var $gt GTrends */ + $gt = $this->gt; + + $trendingSearches = $gt->interestBySubregion(['Dublin']); + + $this->assertEquals(is_array($trendingSearches), true); + } } \ No newline at end of file