-<?php namespace Tests\Entity;
+<?php
+
+namespace Tests\Entity;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\Chapter;
class ExportTest extends TestCase
{
-
public function test_page_text_export()
{
$page = Page::query()->first();
{
$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'));
{
$page = Page::query()->first();
- $customHeadContent = "<!-- A comment -->";
+ $customHeadContent = '<!-- A comment -->';
$this->setSettings(['app-custom-head' => $customHeadContent]);
$resp = $this->asEditor()->get($page->getUrl('/export/html'));
{
$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>');
{
$page = Page::query()->first()->forceFill([
'markdown' => '# A header',
- 'html' => '<h1>Dogcat</h1>',
+ 'html' => '<h1>Dogcat</h1>',
]);
$page->save();
{
$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();
{
$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();
{
$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();
$resp->assertSee('# ' . $chapter->name);
$resp->assertSee('# ' . $page->name);
}
-
}