public function testLocationValidation()
{
$fileName = __DIR__ . '/sitemap.xml';
$sitemap = new Sitemap($fileName);
$exceptionCaught = false;
try {
$sitemap->addItem('http://example.com/mylink1');
$sitemap->addItem('notlink', time());
} catch (\InvalidArgumentException $e) {
$exceptionCaught = true;
}
unlink($fileName);
$this->assertTrue($exceptionCaught, 'Expected InvalidArgumentException wasn\'t thrown.');
}