/** * * @dataProvider providerTestSendRequest * @group live */ public function testSendRequest($url, $postData, $postJson, $assertResponse) { $statusCode = HttpRequest::sendRequest($url, $postData, $postJson); if ($assertResponse) { $this->assertInternalType('string', $statusCode); } else { $this->assertFalse($statusCode); } }
/** * @return HTML string */ protected static function _getPage($url) { $url = self::getUrl($url); if (self::getLastLoadedUrl() == $url) { return self::getLastLoadedHtml(); } $html = Helper\HttpRequest::sendRequest($url); if ($html) { self::$_lastLoadedUrl = $url; self::_setHtml($html); return $html; } else { self::noDataDefaultValue(); } }