24 lines
601 B
PHP
24 lines
601 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace Shimmie2;
|
||
|
|
||
|
class ImageViewCounterTest extends ShimmiePHPUnitTestCase
|
||
|
{
|
||
|
public function testPostView()
|
||
|
{
|
||
|
$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");
|
||
|
}
|
||
|
|
||
|
public function testPopular()
|
||
|
{
|
||
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
||
|
$this->get_page("popular_images");
|
||
|
$this->assert_text("$image_id");
|
||
|
}
|
||
|
}
|