]> BookStack Code Mirror - bookstack/blobdiff - tests/AuditLogTest.php
Make building of search results work for multi-byte encoded characters
[bookstack] / tests / AuditLogTest.php
index 9f6576a46dadcf6ba0dab8e8f8342f947d3dcc71..f909cd79a2959e8b5d943a1add0e980164200ad5 100644 (file)
@@ -17,7 +17,7 @@ class AuditLogTest extends TestCase
     /** @var ActivityService */
     protected $activityService;
 
-    public function setUp(): void
+    protected function setUp(): void
     {
         parent::setUp();
         $this->activityService = app(ActivityService::class);
@@ -152,13 +152,13 @@ class AuditLogTest extends TestCase
             'name' => 'Updated page',
             'html' => '<p>Updated content</p>',
         ], [
-            'X-Forwarded-For' => '192.123.45.1'
+            'X-Forwarded-For' => '192.123.45.1',
         ])->assertRedirect($page->refresh()->getUrl());
 
         $this->assertDatabaseHas('activities', [
-            'type' => ActivityType::PAGE_UPDATE,
-            'ip' => '192.123.45.1',
-            'user_id' => $editor->id,
+            'type'      => ActivityType::PAGE_UPDATE,
+            'ip'        => '192.123.45.1',
+            'user_id'   => $editor->id,
             'entity_id' => $page->id,
         ]);
 
@@ -179,13 +179,13 @@ class AuditLogTest extends TestCase
             'html' => '<p>Updated content</p>',
         ], [
             'X-Forwarded-For' => '192.123.45.1',
-            'REMOTE_ADDR' => '192.123.45.2',
+            'REMOTE_ADDR'     => '192.123.45.2',
         ])->assertRedirect($page->refresh()->getUrl());
 
         $this->assertDatabaseHas('activities', [
-            'type' => ActivityType::PAGE_UPDATE,
-            'ip' => '127.0.0.1',
-            'user_id' => $editor->id,
+            'type'      => ActivityType::PAGE_UPDATE,
+            'ip'        => '127.0.0.1',
+            'user_id'   => $editor->id,
             'entity_id' => $page->id,
         ]);
     }