Skip to content

Commit 9980a37

Browse files
committed
fix test
1 parent a16264d commit 9980a37

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ phpstan.neon
99
testbench.yaml
1010
vendor
1111
node_modules
12+
.phpunit.cache

src/Message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function markAsRead(): static
6868
return $this;
6969
}
7070

71-
public function markReadBy(int $id, Carbon $datetime = null): static
71+
public function markReadBy(int $id, ?Carbon $datetime = null): static
7272
{
7373
$metadata = $this->metadata;
7474

tests/MessageTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
use Carbon\Carbon;
44
use Finller\Conversation\Message;
5-
use Finller\Conversation\WidgetExample;
65

76
it('can mark message read by a user', function () {
87
$USER_ID = 102;
@@ -29,12 +28,3 @@
2928

3029
expect($message->getReadBy($USER_ID))->toBeInstanceOf(Carbon::class);
3130
});
32-
33-
it('serialize and unserialize widget', function () {
34-
/** @var Message */
35-
$message = Message::factory()->make([
36-
'widget' => new WidgetExample('Hello', 'World'), // will call Attribute set function
37-
]);
38-
39-
expect($message->widget)->toBeInstanceOf(WidgetExample::class);
40-
});

0 commit comments

Comments
 (0)