Skip to content

Commit 9582ed4

Browse files
chore: use single extend
1 parent 89c5462 commit 9582ed4

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

framework/core/tests/integration/api/discussions/CreateTest.php

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,12 @@ public function cannot_create_discussion_without_content_property()
7979
->unparse(function ($content) {
8080
return $content;
8181
})
82-
);
8382

84-
// $this->extend(
85-
// (new Extend\Event())
86-
// ->listen(\Flarum\Post\Event\Saving::class, function ($event) {
87-
// $event->post->content;
88-
// })
89-
// );
83+
(new Extend\Event())
84+
->listen(\Flarum\Post\Event\Saving::class, function ($event) {
85+
$event->post->content;
86+
})
87+
);
9088

9189
$response = $this->send(
9290
$this->request('POST', '/api/discussions', [
@@ -122,14 +120,12 @@ public function cannot_create_discussion_without_content_property()
122120
*/
123121
public function cannot_create_discussion_with_content_set_to_null()
124122
{
125-
// $this->extend(
126-
// (new Extend\Formatter)
127-
// ->unparse(function ($content) {
128-
// return $content;
129-
// })
130-
// );
131-
132123
$this->extend(
124+
(new Extend\Formatter)
125+
->unparse(function ($content) {
126+
return $content;
127+
})
128+
133129
(new Extend\Event())
134130
->listen(\Flarum\Post\Event\Saving::class, function ($event) {
135131
$event->post->content;

0 commit comments

Comments
 (0)