forceCreate([ 'html' => 'some_old_content', 'text' => 'some_fresh_content', ]); $this->assertDatabaseHas('comments', [ 'html' => 'some_old_content', ]); $exitCode = \Artisan::call('bookstack:regenerate-comment-content'); $this->assertTrue($exitCode === 0, 'Command executed successfully'); $this->assertDatabaseMissing('comments', [ 'html' => 'some_old_content', ]); $this->assertDatabaseHas('comments', [ 'html' => "

some_fresh_content

\n", ]); } }