3 namespace Tests\Commands;
5 use Illuminate\Support\Facades\DB;
8 class RegenerateReferencesCommandTest extends TestCase
10 public function test_regenerate_references_command()
12 $page = $this->entities->page();
15 $page->html = '<a href="' . $book->getUrl() . '">Book Link</a>';
18 DB::table('references')->delete();
20 $this->artisan('bookstack:regenerate-references')
23 $this->assertDatabaseHas('references', [
24 'from_id' => $page->id,
25 'from_type' => $page->getMorphClass(),
27 'to_type' => $book->getMorphClass(),