File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33use Kirschbaum \Commentions \Comment ;
44use Kirschbaum \Commentions \Comment as CommentModel ;
5+ use Kirschbaum \Commentions \Config ;
56use Kirschbaum \Commentions \Livewire \Comment as CommentComponent ;
67use Kirschbaum \Commentions \RenderableComment ;
78use Tests \Models \Post ;
232233 $ post = Post::factory ()->create ();
233234 $ comment = CommentModel::factory ()->author ($ user )->commentable ($ post )->create ();
234235
236+ $ componentAlias = Config::getComponentPrefix ().'comment ' ;
237+
235238 livewire (CommentComponent::class, [
236239 'comment ' => $ comment ,
237240 ])
238241 ->call ('edit ' )
239- ->assertSee (' commentions.comment ' , false );
242+ ->assertSee ($ componentAlias , false );
240243});
241244
242245test ('can render a custom renderable comment ' , function () {
Original file line number Diff line number Diff line change 11<?php
22
33use Illuminate \Support \Facades \Event ;
4+ use Kirschbaum \Commentions \Config ;
45use Kirschbaum \Commentions \Events \CommentWasCreatedEvent ;
56use Kirschbaum \Commentions \Livewire \Comments ;
67use Tests \Models \Post ;
9192
9293 $ post = Post::factory ()->create ();
9394
95+ $ componentAlias = Config::getComponentPrefix ().'comments ' ;
96+
9497 livewire (Comments::class, [
9598 'record ' => $ post ,
96- ])->assertSee (' commentions.comments ' , false );
99+ ])->assertSee ($ componentAlias , false );
97100});
You can’t perform that action at this time.
0 commit comments