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/image_view_counter/test.php

25 lines
661 B
PHP
Raw Normal View History

2024-01-03 03:45:06 +00:00
<?php
declare(strict_types=1);
namespace Shimmie2;
class ImageViewCounterTest extends ShimmiePHPUnitTestCase
{
2024-01-15 14:31:51 +00:00
public function testPostView(): void
2024-01-03 03:45:06 +00:00
{
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
$this->log_in_as_admin();
$this->get_page("post/view/$image_id");
$this->assert_text("Views");
}
2024-01-15 14:31:51 +00:00
public function testPopular(): void
2024-01-03 03:45:06 +00:00
{
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
$this->get_page("post/view/$image_id");
2024-01-03 03:45:06 +00:00
$this->get_page("popular_images");
$this->assert_text("$image_id");
}
}