]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/ExportTest.php
Apply fixes from StyleCI
[bookstack] / tests / Entity / ExportTest.php
index f437904e842517375b20599142a538f07ebfe0ab..4c6fb1a74f43da2c09011c42f9dabb1267bca328 100644 (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);
     }
-
 }