File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed
framework/core/tests/integration/api/discussions Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -79,14 +79,12 @@ public function cannot_create_discussion_without_content_property()
79
79
->unparse (function ($ content ) {
80
80
return $ content ;
81
81
})
82
- );
83
82
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
+ );
90
88
91
89
$ response = $ this ->send (
92
90
$ this ->request ('POST ' , '/api/discussions ' , [
@@ -122,14 +120,12 @@ public function cannot_create_discussion_without_content_property()
122
120
*/
123
121
public function cannot_create_discussion_with_content_set_to_null ()
124
122
{
125
- // $this->extend(
126
- // (new Extend\Formatter)
127
- // ->unparse(function ($content) {
128
- // return $content;
129
- // })
130
- // );
131
-
132
123
$ this ->extend (
124
+ (new Extend \Formatter )
125
+ ->unparse (function ($ content ) {
126
+ return $ content ;
127
+ })
128
+
133
129
(new Extend \Event ())
134
130
->listen (\Flarum \Post \Event \Saving::class, function ($ event ) {
135
131
$ event ->post ->content ;
You can’t perform that action at this time.
0 commit comments