mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
@@ -1,10 +1,11 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Auth\User;
|
||||
use BookStack\Entities\Book;
|
||||
use BookStack\Entities\Bookshelf;
|
||||
use BookStack\Uploads\Image;
|
||||
use Illuminate\Support\Str;
|
||||
use Tests\TestCase;
|
||||
use Tests\Uploads\UsesImages;
|
||||
|
||||
class BookShelfTest extends TestCase
|
||||
|
@@ -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');
|
||||
}
|
||||
}
|
@@ -1,7 +1,8 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Entities\Page;
|
||||
use BookStack\Actions\Comment;
|
||||
use Tests\TestCase;
|
||||
|
||||
class CommentTest extends TestCase
|
||||
{
|
||||
|
@@ -1,10 +1,11 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Actions\Tag;
|
||||
use BookStack\Entities\Book;
|
||||
use BookStack\Entities\Bookshelf;
|
||||
use BookStack\Entities\Chapter;
|
||||
use BookStack\Entities\Page;
|
||||
use Tests\TestCase;
|
||||
|
||||
class EntitySearchTest extends TestCase
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Entities\Bookshelf;
|
||||
use BookStack\Entities\Book;
|
||||
@@ -7,6 +7,7 @@ use BookStack\Entities\Page;
|
||||
use BookStack\Auth\UserRepo;
|
||||
use BookStack\Entities\Repos\PageRepo;
|
||||
use Carbon\Carbon;
|
||||
use Tests\BrowserKitTest;
|
||||
|
||||
class EntityTest extends BrowserKitTest
|
||||
{
|
||||
|
@@ -1,10 +1,11 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
|
||||
use BookStack\Entities\Chapter;
|
||||
use BookStack\Entities\Page;
|
||||
use BookStack\Uploads\HttpFetcher;
|
||||
use Illuminate\Support\Str;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ExportTest extends TestCase
|
||||
{
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use Tests\BrowserKitTest;
|
||||
|
||||
class MarkdownTest extends BrowserKitTest
|
||||
{
|
||||
|
@@ -1,7 +1,8 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Entities\Managers\PageContent;
|
||||
use BookStack\Entities\Page;
|
||||
use Tests\TestCase;
|
||||
|
||||
class PageContentTest extends TestCase
|
||||
{
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Entities\Repos\PageRepo;
|
||||
use Tests\BrowserKitTest;
|
||||
|
||||
class PageDraftTest extends BrowserKitTest
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php namespace Entity;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Entities\Page;
|
||||
use BookStack\Entities\Repos\PageRepo;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php namespace Entity;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Entities\Page;
|
||||
use Tests\TestCase;
|
||||
|
@@ -1,9 +1,10 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Entities\Book;
|
||||
use BookStack\Entities\Chapter;
|
||||
use BookStack\Entities\Page;
|
||||
use BookStack\Entities\Repos\PageRepo;
|
||||
use Tests\TestCase;
|
||||
|
||||
class SortTest extends TestCase
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php namespace Tests;
|
||||
<?php namespace Tests\Entity;
|
||||
|
||||
use BookStack\Entities\Book;
|
||||
use BookStack\Entities\Chapter;
|
||||
@@ -6,6 +6,7 @@ use BookStack\Actions\Tag;
|
||||
use BookStack\Entities\Entity;
|
||||
use BookStack\Entities\Page;
|
||||
use BookStack\Auth\Permissions\PermissionService;
|
||||
use Tests\BrowserKitTest;
|
||||
|
||||
class TagTest extends BrowserKitTest
|
||||
{
|
||||
|
Reference in New Issue
Block a user