/** * @test * @group sitemap */ public function test_ping() { // Ping keys $keys = array_keys(Kohana::$config->load('sitemap.ping')); $statuses = Sitemap::ping('http://example.com/sitemap.xml'); // Make sure we get a valid HTTP code back. foreach ($keys as $row) { $this->assertRegExp('/^([1-5][0-9]{2}|0)$/', (string) $statuses[$row]); } }
public function onAfterUnpublish() { Sitemap::ping(); }