Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Sep 27, 2024
1 parent a2e05b8 commit 5ee4048
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
13 changes: 7 additions & 6 deletions extensions/messages/tests/integration/api/ListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace Flarum\Messages\Tests\integration\api;

use Carbon\Carbon;
use Flarum\Messages\Dialog;
use Flarum\Messages\DialogMessage;
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
Expand Down Expand Up @@ -46,12 +47,12 @@ protected function setUp(): void
['id' => 107, 'dialog_id' => 104, 'user_id' => 5, 'content' => 'Hello, Gale!'],
],
'dialog_user' => [
['dialog_id' => 102, 'user_id' => 3],
['dialog_id' => 102, 'user_id' => 4],
['dialog_id' => 103, 'user_id' => 3],
['dialog_id' => 103, 'user_id' => 5],
['dialog_id' => 104, 'user_id' => 4],
['dialog_id' => 104, 'user_id' => 5],
['dialog_id' => 102, 'user_id' => 3, 'joined_at' => Carbon::now()],
['dialog_id' => 102, 'user_id' => 4, 'joined_at' => Carbon::now()],
['dialog_id' => 103, 'user_id' => 3, 'joined_at' => Carbon::now()],
['dialog_id' => 103, 'user_id' => 5, 'joined_at' => Carbon::now()],
['dialog_id' => 104, 'user_id' => 4, 'joined_at' => Carbon::now()],
['dialog_id' => 104, 'user_id' => 5, 'joined_at' => Carbon::now()],
],
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace Flarum\Messages\Tests\integration\api\dialog_messages;

use Carbon\Carbon;
use Flarum\Messages\Dialog;
use Flarum\Messages\DialogMessage;
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
Expand Down Expand Up @@ -38,8 +39,8 @@ protected function setUp(): void
['id' => 102, 'dialog_id' => 102, 'user_id' => 4, 'content' => 'Hello, Karlach!'],
],
'dialog_user' => [
['dialog_id' => 102, 'user_id' => 4],
['dialog_id' => 102, 'user_id' => 5],
['dialog_id' => 102, 'user_id' => 4, 'joined_at' => Carbon::now()],
['dialog_id' => 102, 'user_id' => 5, 'joined_at' => Carbon::now()],
],
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace Flarum\Messages\Tests\integration\api\dialogs;

use Carbon\Carbon;
use Flarum\Messages\Dialog;
use Flarum\Messages\DialogMessage;
use Flarum\Messages\UserDialogState;
Expand Down Expand Up @@ -48,8 +49,8 @@ protected function setUp(): void
['id' => 111, 'dialog_id' => 102, 'user_id' => 3, 'content' => '<p>Hello, Bob!</p>'],
],
'dialog_user' => [
['dialog_id' => 102, 'user_id' => 3, 'last_read_message_id' => 0, 'last_read_at' => null],
['dialog_id' => 102, 'user_id' => 4, 'last_read_message_id' => 0, 'last_read_at' => null],
['dialog_id' => 102, 'user_id' => 3, 'last_read_message_id' => 0, 'last_read_at' => null, 'joined_at' => Carbon::now()],
['dialog_id' => 102, 'user_id' => 4, 'last_read_message_id' => 0, 'last_read_at' => null, 'joined_at' => Carbon::now()],
],
]);
}
Expand Down

0 comments on commit 5ee4048

Please sign in to comment.