X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/00eedafbfdf2e60c7ffebb7e7ccf2a65ffa75b51..refs/pull/3617/head:/tests/Actions/WebhookCallTest.php diff --git a/tests/Actions/WebhookCallTest.php b/tests/Actions/WebhookCallTest.php index d9f9ddad5..078b8bdf4 100644 --- a/tests/Actions/WebhookCallTest.php +++ b/tests/Actions/WebhookCallTest.php @@ -7,7 +7,6 @@ use BookStack\Actions\ActivityType; use BookStack\Actions\DispatchWebhookJob; use BookStack\Actions\Webhook; use BookStack\Auth\User; -use BookStack\Entities\Models\Page; use Illuminate\Http\Client\Request; use Illuminate\Support\Facades\Bus; use Illuminate\Support\Facades\Http; @@ -88,9 +87,8 @@ class WebhookCallTest extends TestCase '*' => Http::response('', 200), ]); $webhook = $this->newWebhook(['active' => true, 'endpoint' => 'https://wh.example.com'], ['all']); - /** @var Page $page */ - $page = Page::query()->first(); - $editor = $this->getEditor(); + $page = $this->entities->page(); + $editor = $this->users->editor(); $this->runEvent(ActivityType::PAGE_UPDATE, $page, $editor); @@ -113,7 +111,7 @@ class WebhookCallTest extends TestCase protected function runEvent(string $event, $detail = '', ?User $user = null) { if (is_null($user)) { - $user = $this->getEditor(); + $user = $this->users->editor(); } $this->actingAs($user);