Updated test files to be PSR-4 compliant

Closes #1924
This commit is contained in:
Dan Brown
2020-04-04 01:16:05 +01:00
parent 3500182c5f
commit f84bf8e883
33 changed files with 89 additions and 62 deletions

View File

@ -1,28 +1,35 @@
<?php namespace Tests;
<?php namespace Tests\Entity;
class CommentSettingTest extends BrowserKitTest {
protected $page;
use BookStack\Entities\Page;
use Tests\BrowserKitTest;
public function setUp(): void {
parent::setUp();
$this->page = \BookStack\Entities\Page::first();
}
class CommentSettingTest extends BrowserKitTest
{
protected $page;
public function test_comment_disable () {
$this->asAdmin();
public function setUp(): void
{
parent::setUp();
$this->page = Page::first();
}
$this->setSettings(['app-disable-comments' => 'true']);
public function test_comment_disable()
{
$this->asAdmin();
$this->asAdmin()->visit($this->page->getUrl())
->pageNotHasElement('.comments-list');
}
$this->setSettings(['app-disable-comments' => 'true']);
public function test_comment_enable () {
$this->asAdmin();
$this->asAdmin()->visit($this->page->getUrl())
->pageNotHasElement('.comments-list');
}
$this->setSettings(['app-disable-comments' => 'false']);
public function test_comment_enable()
{
$this->asAdmin();
$this->asAdmin()->visit($this->page->getUrl())
->pageHasElement('.comments-list');
}
$this->setSettings(['app-disable-comments' => 'false']);
$this->asAdmin()->visit($this->page->getUrl())
->pageHasElement('.comments-list');
}
}