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

40 lines
1.1 KiB
PHP
Raw Normal View History

2021-12-14 18:32:47 +00:00
<?php
declare(strict_types=1);
namespace Shimmie2;
class BlotterTest extends ShimmiePHPUnitTestCase
{
2024-01-15 14:31:51 +00:00
public function testDenial(): void
{
2024-02-11 15:47:40 +00:00
$this->assertException(PermissionDenied::class, function () {
$this->get_page("blotter/editor");
});
2024-02-11 15:47:40 +00:00
$this->assertException(PermissionDenied::class, function () {
$this->post_page("blotter/add");
});
2024-02-11 15:47:40 +00:00
$this->assertException(PermissionDenied::class, function () {
$this->post_page("blotter/remove");
});
}
2010-02-18 16:22:10 +00:00
2024-01-15 14:31:51 +00:00
public function testAddViewRemove(): void
{
$this->log_in_as_admin();
2010-02-18 15:58:23 +00:00
2020-01-29 20:22:50 +00:00
$page = $this->get_page("blotter/editor");
$this->assertEquals(200, $page->code);
//$this->set_field("entry_text", "blotter testing");
//$this->click("Add");
//$this->assert_text("blotter testing");
2010-02-18 15:58:23 +00:00
$this->get_page("blotter");
//$this->assert_text("blotter testing");
2010-02-18 15:58:23 +00:00
$this->get_page("blotter/editor");
//$this->click("Remove");
//$this->assert_no_text("blotter testing");
}
2010-02-18 14:34:44 +00:00
}