Beispiel #1
0
 /**
  *@test
  */
 public function the_content_repo_can_return_a_collection_of_all_page_names_and_urls()
 {
     $repo = new ContentRepository();
     $home = Page::create(['name' => 'home', 'description' => 'The homepage']);
     $about = Page::create(['name' => 'about', 'description' => 'The about page']);
     $expected = collect([['name' => 'home', 'url' => '/package-edible/pages/' . $home->id], ['name' => 'about', 'url' => '/package-edible/pages/' . $about->id]]);
     $this->assertEquals($expected, $repo->getPageListWithUrls());
 }