/** * Send a request to google tools api for the sitemap crawling. * * @param string $xmlSiteUrl http://www.example.com/sitemap.xml */ public function googleSitemapToolCommand($xmlSiteUrl) { $googleSitemapPing = new GoogleSitemapService($xmlSiteUrl); $httpCode = $googleSitemapPing->sendRequest(); if ($httpCode === 200) { $this->outputLine('success'); } $this->outputLine('error'); }
/** * @test */ public function requestTest() { $this->assertEquals($this->googleSitemapService->sendRequest(), 200, 'Service not available'); }