]> BookStack Code Mirror - bookstack/blob - tests/Entity/CommentSettingTest.php
Sort Rules: Updated name comparison to not ignore non-ascii chars
[bookstack] / tests / Entity / CommentSettingTest.php
1 <?php
2
3 namespace Tests\Entity;
4
5 use Tests\TestCase;
6
7 class CommentSettingTest extends TestCase
8 {
9     public function test_comment_disable()
10     {
11         $page = $this->entities->page();
12         $this->setSettings(['app-disable-comments' => 'true']);
13         $this->asAdmin();
14
15         $resp = $this->asAdmin()->get($page->getUrl());
16         $this->withHtml($resp)->assertElementNotExists('.comments-list');
17     }
18
19     public function test_comment_enable()
20     {
21         $page = $this->entities->page();
22         $this->setSettings(['app-disable-comments' => 'false']);
23         $this->asAdmin();
24
25         $resp = $this->asAdmin()->get($page->getUrl());
26         $this->withHtml($resp)->assertElementExists('.comments-list');
27     }
28 }