X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/887a79f130f7994cd2b5633218ca8eadddf55af7..refs/pull/3072/head:/tests/AuditLogTest.php diff --git a/tests/AuditLogTest.php b/tests/AuditLogTest.php index 9f6576a46..f909cd79a 100644 --- a/tests/AuditLogTest.php +++ b/tests/AuditLogTest.php @@ -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' => '

Updated content

', ], [ - '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' => '

Updated content

', ], [ '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, ]); }