public function testNoErrortrnd() { $nw = new NewWorld(); $toa = $nw->GetAPICon(); $query = array("id" => 1); $this->assertArrayNotHasKey('error', $nw->GetTrendPlace($toa, $query)); }
/** * Created by PhpStorm. * User: kongu * Date: 01-Aug-15 * Time: 11:36 PM */ require_once getcwd() . '/twitteroauth/autoload.php'; require_once getcwd() . '/phpInsight-master/autoload.php'; require_once getcwd() . '/NewWorld.php'; use Abraham\TwitterOAuth\TwitterOAuth; #use NewWorld; try { $sentiment = new \PHPInsight\Sentiment(); $nw = new NewWorld(); $toa = $nw->GetAPICon(); $woeid_World = 23424977; $query_World = array("id" => $woeid_World); $results_world = $nw->GetTrendPlace($toa, $query_World); echo '<html><head> <style> @font-face { font-family: moltor; src: url(fonts/Moltorv2i.ttf); } </style> <script type="text/javascript">'; echo "function rawurlencode(str) {\n str = (str + '').toString();\n return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/\\*/g, '%2A');\n }\n function pass(id){\n parent.cht.location.replace('tweet_chrt.php?link='+rawurlencode(document.getElementById(id).value));\n parent.ts.location.replace('tweet_stat.php?link='+rawurlencode(document.getElementById(id).value));\n }\n </script>\n </head><body style=\"height: 100%; margin: 0px;\">"; echo '<table width=100%> <tr> <td><div style="background-image: url("Images/txtr2.jpg");"><a style="font-size: large;font-family: moltor"> Trending in USA : </a></div> </td>