]> BookStack Code Mirror - bookstack/blobdiff - tests/Actions/WebhookCallTest.php
Revert some changes to HttpFetchException
[bookstack] / tests / Actions / WebhookCallTest.php
index d9f9ddad591cd61ea26f5953e22f0bf827b003ae..f2def087b0c1b13b7860847f51e968e838ba1609 100644 (file)
@@ -2,12 +2,11 @@
 
 namespace Tests\Actions;
 
-use BookStack\Actions\ActivityLogger;
-use BookStack\Actions\ActivityType;
-use BookStack\Actions\DispatchWebhookJob;
-use BookStack\Actions\Webhook;
-use BookStack\Auth\User;
-use BookStack\Entities\Models\Page;
+use BookStack\Activity\ActivityType;
+use BookStack\Activity\DispatchWebhookJob;
+use BookStack\Activity\Models\Webhook;
+use BookStack\Activity\Tools\ActivityLogger;
+use BookStack\Users\Models\User;
 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);