. */ use Carbon\Carbon; use Illuminate\Foundation\Testing\WithoutMiddleware; use Illuminate\Foundation\Testing\DatabaseMigrations; use Poniverse\Ponyfm\Models\Album; use Poniverse\Ponyfm\Models\Comment; use Poniverse\Ponyfm\Models\Genre; use Poniverse\Ponyfm\Models\Track; use Poniverse\Ponyfm\Models\User; class CommentsTest extends TestCase { use DatabaseMigrations; use WithoutMiddleware; public function testCommentMentionsParsing() { /** @var Comment $comment */ $comment = factory(Comment::class)->make(); $comment->content = <<c1234 This>c24 is an awesome track!!! >c65437 >u4678 >4bsfsd gfdsgfds>c16437boomboom >47 >c44 EOF; $this->assertEquals([1234, 65437, 44], $comment->getMentionedCommentIds()); } }