1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Apply fixes from StyleCI

This commit is contained in:
Dan Brown
2021-06-26 15:23:15 +00:00
committed by StyleCI Bot
parent 3a402f6adc
commit 934a833818
349 changed files with 3655 additions and 2625 deletions

View File

@ -1,4 +1,6 @@
<?php namespace Tests\Entity;
<?php
namespace Tests\Entity;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\Chapter;
@ -9,7 +11,6 @@ use Tests\TestCase;
class ExportTest extends TestCase
{
public function test_page_text_export()
{
$page = Page::query()->first();
@ -133,7 +134,7 @@ class ExportTest extends TestCase
{
$page = Page::query()->first();
$customHeadContent = "<style>p{color: red;}</style>";
$customHeadContent = '<style>p{color: red;}</style>';
$this->setSettings(['app-custom-head' => $customHeadContent]);
$resp = $this->asEditor()->get($page->getUrl('/export/html'));
@ -144,7 +145,7 @@ class ExportTest extends TestCase
{
$page = Page::query()->first();
$customHeadContent = "<!-- A comment -->";
$customHeadContent = '<!-- A comment -->';
$this->setSettings(['app-custom-head' => $customHeadContent]);
$resp = $this->asEditor()->get($page->getUrl('/export/html'));
@ -209,8 +210,8 @@ class ExportTest extends TestCase
{
$page = Page::query()->first();
$page->html = '<img src="http://localhost/uploads/images/gallery/svg_test.svg"/>'
.'<img src="http://localhost/uploads/svg_test.svg"/>'
.'<img src="/uploads/svg_test.svg"/>';
. '<img src="http://localhost/uploads/svg_test.svg"/>'
. '<img src="/uploads/svg_test.svg"/>';
$storageDisk = Storage::disk('local');
$storageDisk->makeDirectory('uploads/images/gallery');
$storageDisk->put('uploads/images/gallery/svg_test.svg', '<svg>good</svg>');
@ -273,7 +274,7 @@ class ExportTest extends TestCase
{
$page = Page::query()->first()->forceFill([
'markdown' => '# A header',
'html' => '<h1>Dogcat</h1>',
'html' => '<h1>Dogcat</h1>',
]);
$page->save();
@ -286,7 +287,7 @@ class ExportTest extends TestCase
{
$page = Page::query()->first()->forceFill([
'markdown' => '',
'html' => "<h1>Dogcat</h1><p>Some <strong>bold</strong> text</p>",
'html' => '<h1>Dogcat</h1><p>Some <strong>bold</strong> text</p>',
]);
$page->save();
@ -298,7 +299,7 @@ class ExportTest extends TestCase
{
$page = Page::query()->first()->forceFill([
'markdown' => '',
'html' => "<h1>Dogcat</h1><p class=\"callout info\">Some callout text</p><p>Another line</p>",
'html' => '<h1>Dogcat</h1><p class="callout info">Some callout text</p><p>Another line</p>',
]);
$page->save();
@ -310,7 +311,7 @@ class ExportTest extends TestCase
{
$page = Page::query()->first()->forceFill([
'markdown' => '',
'html' => '<h1>Dogcat</h1>'."\r\n".'<pre id="bkmrk-var-a-%3D-%27cat%27%3B"><code class="language-JavaScript">var a = \'cat\';</code></pre><p>Another line</p>',
'html' => '<h1>Dogcat</h1>' . "\r\n" . '<pre id="bkmrk-var-a-%3D-%27cat%27%3B"><code class="language-JavaScript">var a = \'cat\';</code></pre><p>Another line</p>',
]);
$page->save();
@ -339,5 +340,4 @@ class ExportTest extends TestCase
$resp->assertSee('# ' . $chapter->name);
$resp->assertSee('# ' . $page->name);
}
}