-<?php
-
-namespace Tests;
+<?php namespace Tests\Api;
use BookStack\Auth\Permissions\RolePermission;
use BookStack\Auth\User;
use Carbon\Carbon;
+use Tests\TestCase;
class ApiAuthTest extends TestCase
{
-<?php
+<?php namespace Tests\Api;
-namespace Tests;
-
-use BookStack\Auth\Permissions\RolePermission;
-use Carbon\Carbon;
+use Tests\TestCase;
class ApiConfigTest extends TestCase
{
-<?php
+<?php namespace Tests\Api;
-namespace Tests;
+use Tests\TestCase;
class ApiDocsTest extends TestCase
{
-<?php
-
-namespace Tests;
+<?php namespace Tests\Api;
use BookStack\Entities\Book;
+use Tests\TestCase;
class ApiListingTest extends TestCase
{
-<?php namespace Tests;
+<?php namespace Tests\Api;
use BookStack\Entities\Book;
+use Tests\TestCase;
class BooksApiTest extends TestCase
{
-<?php
-
-namespace Tests;
+<?php namespace Tests\Api;
trait TestsApi
{
-<?php namespace Tests;
+<?php namespace Tests\Auth;
use BookStack\Auth\User;
use BookStack\Entities\Page;
use BookStack\Notifications\ConfirmEmail;
use BookStack\Settings\SettingService;
use Illuminate\Support\Facades\Notification;
+use Tests\BrowserKitTest;
class AuthTest extends BrowserKitTest
{
-<?php namespace Tests;
+<?php namespace Tests\Auth;
use BookStack\Auth\Access\LdapService;
use BookStack\Auth\Role;
use BookStack\Auth\Access\Ldap;
use BookStack\Auth\User;
use Mockery\MockInterface;
+use Tests\BrowserKitTest;
class LdapTest extends BrowserKitTest
{
-<?php namespace Tests;
+<?php namespace Tests\Auth;
use BookStack\Auth\Role;
use BookStack\Auth\User;
+use Tests\TestCase;
class Saml2Test extends TestCase
{
-<?php namespace Tests;
+<?php namespace Tests\Auth;
use BookStack\Auth\User;
use DB;
use Laravel\Socialite\Contracts\Factory;
use Laravel\Socialite\Contracts\Provider;
use Mockery;
+use Tests\TestCase;
class SocialAuthTest extends TestCase
{
-<?php namespace Tests;
+<?php namespace Tests\Auth;
use BookStack\Auth\Access\UserInviteService;
use DB;
use Illuminate\Support\Str;
use Notification;
+use Tests\TestCase;
class UserInviteTest extends TestCase
{
-<?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
-<?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');
+ }
}
\ No newline at end of file
-<?php namespace Tests;
+<?php namespace Tests\Entity;
use BookStack\Entities\Page;
use BookStack\Actions\Comment;
+use Tests\TestCase;
class CommentTest extends TestCase
{
-<?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
{
-<?php namespace Tests;
+<?php namespace Tests\Entity;
use BookStack\Entities\Bookshelf;
use BookStack\Entities\Book;
use BookStack\Auth\UserRepo;
use BookStack\Entities\Repos\PageRepo;
use Carbon\Carbon;
+use Tests\BrowserKitTest;
class EntityTest extends BrowserKitTest
{
-<?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
{
-<?php namespace Tests;
+<?php namespace Tests\Entity;
+
+use Tests\BrowserKitTest;
class MarkdownTest extends BrowserKitTest
{
-<?php namespace Tests;
+<?php namespace Tests\Entity;
use BookStack\Entities\Managers\PageContent;
use BookStack\Entities\Page;
+use Tests\TestCase;
class PageContentTest extends TestCase
{
-<?php namespace Tests;
+<?php namespace Tests\Entity;
use BookStack\Entities\Repos\PageRepo;
+use Tests\BrowserKitTest;
class PageDraftTest extends BrowserKitTest
{
-<?php namespace Entity;
+<?php namespace Tests\Entity;
use BookStack\Entities\Page;
use BookStack\Entities\Repos\PageRepo;
-<?php namespace Entity;
+<?php namespace Tests\Entity;
use BookStack\Entities\Page;
use Tests\TestCase;
-<?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
{
-<?php namespace Tests;
+<?php namespace Tests\Entity;
use BookStack\Entities\Book;
use BookStack\Entities\Chapter;
use BookStack\Entities\Entity;
use BookStack\Entities\Page;
use BookStack\Auth\Permissions\PermissionService;
+use Tests\BrowserKitTest;
class TagTest extends BrowserKitTest
{
-<?php namespace Tests;
+<?php namespace Tests\Permissions;
use BookStack\Entities\Book;
use BookStack\Entities\Bookshelf;
use BookStack\Entities\Entity;
use BookStack\Auth\User;
use BookStack\Entities\Page;
+use Tests\BrowserKitTest;
class RestrictionsTest extends BrowserKitTest
{
-<?php namespace Tests;
+<?php namespace Tests\Permissions;
use BookStack\Entities\Bookshelf;
use BookStack\Entities\Page;
use BookStack\Auth\Role;
use Laravel\BrowserKitTesting\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Tests\BrowserKitTest;
class RolesTest extends BrowserKitTest
{
-<?php namespace Tests;
+<?php namespace Tests\Unit;
+
+use Tests\TestCase;
/**
* Class ConfigTest
-<?php namespace Tests;
+<?php namespace Tests\Unit;
+
+use Tests\TestCase;
class UrlTest extends TestCase
{
-<?php namespace Tests;
+<?php namespace Tests\Uploads;
use BookStack\Uploads\Attachment;
use BookStack\Entities\Page;
use BookStack\Auth\Permissions\PermissionService;
+use Tests\TestCase;
class AttachmentTest extends TestCase
{
<?php namespace Tests\Uploads;
-
use BookStack\Entities\Page;
use Illuminate\Http\UploadedFile;
-<?php namespace Test;
+<?php namespace Test\User;
use BookStack\Api\ApiToken;
use Carbon\Carbon;
-<?php namespace Tests;
+<?php namespace Test\User;
+
+use Tests\TestCase;
class UserPreferencesTest extends TestCase
{
-<?php namespace Tests;
+<?php namespace Test\User;
+
+use Tests\BrowserKitTest;
class UserProfileTest extends BrowserKitTest
{