Renaming method name for clarity

parent 0c259bb6
...@@ -191,7 +191,7 @@ class EloquentPageRepositoryTest extends BasePageTest ...@@ -191,7 +191,7 @@ class EloquentPageRepositoryTest extends BasePageTest
/** @test */ /** @test */
public function it_can_mark_page_as_online_in_all_locales() public function it_can_mark_page_as_online_in_all_locales()
{ {
$page = $this->createRandomPage(['en' => ['status' => 0], 'fr' => ['status' => 0]]); $page = $this->createRandomOfflinePage();
$page = $this->page->markAsOnlineInAllLocales($page->id); $page = $this->page->markAsOnlineInAllLocales($page->id);
...@@ -212,7 +212,7 @@ class EloquentPageRepositoryTest extends BasePageTest ...@@ -212,7 +212,7 @@ class EloquentPageRepositoryTest extends BasePageTest
]); ]);
} }
private function createRandomPage(array $properties) private function createRandomOfflinePage()
{ {
$faker = \Faker\Factory::create(); $faker = \Faker\Factory::create();
...@@ -220,16 +220,19 @@ class EloquentPageRepositoryTest extends BasePageTest ...@@ -220,16 +220,19 @@ class EloquentPageRepositoryTest extends BasePageTest
'is_home' => 0, 'is_home' => 0,
'template' => 'default', 'template' => 'default',
'en' => [ 'en' => [
'status' => 0,
'title' => $faker->name, 'title' => $faker->name,
'slug' => $faker->slug, 'slug' => $faker->slug,
'body' => $faker->paragraph(), 'body' => $faker->paragraph(),
], ],
'fr' => [ 'fr' => [
'status' => 0,
'title' => $faker->name, 'title' => $faker->name,
'slug' => $faker->slug, 'slug' => $faker->slug,
'body' => $faker->paragraph(), 'body' => $faker->paragraph(),
], ],
]; ];
return $this->page->create($data + $properties);
return $this->page->create($data);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment