This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/sitemap/test.php

29 lines
747 B
PHP
Raw Normal View History

2021-12-14 18:32:47 +00:00
<?php
declare(strict_types=1);
namespace Shimmie2;
class XMLSitemapTest extends ShimmiePHPUnitTestCase
{
2024-01-15 14:31:51 +00:00
public function testBasic(): void
{
// check empty DB
@unlink(data_path("cache/sitemap.xml"));
$page = $this->get_page('sitemap.xml');
$this->assertEquals(200, $page->code);
$this->log_in_as_user();
$this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
// check DB with one image
@unlink(data_path("cache/sitemap.xml"));
$page = $this->get_page('sitemap.xml');
$this->assertEquals(200, $page->code);
// check caching
2020-01-29 20:22:50 +00:00
$page = $this->get_page('sitemap.xml');
$this->assertEquals(200, $page->code);
}
2009-08-03 17:35:32 +00:00
}