fix conflicts files pull requests

This commit is contained in:
2023-12-22 23:49:55 +03:00
7 changed files with 25 additions and 29 deletions

3
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "71767f4485e6335b0a9d934fafcfad8e",
"content-hash": "f1504229d84c399a1c8aea12005e3530",
"packages": [
{
"name": "aalaap/faker-youtube",
@@ -13868,3 +13868,4 @@
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

View File

@@ -24,7 +24,7 @@ class CreateTest extends TestCase
public function setUp(): void
{
parent::setUp();
$this->refreshApplicationWithLocale('en');
Storage::fake('plans');
$this->image = UploadedFile::fake()->image('plan.png');
@@ -32,7 +32,6 @@ class CreateTest extends TestCase
$this->user = User::factory()->create(['is_consultant' => true]);
$this->plan = Plan::factory()->make();
$this->refreshApplicationWithLocale('en');
}
public function test_show_form_create_plan()
@@ -42,7 +41,6 @@ class CreateTest extends TestCase
->get(route('plan.create'));
$response->assertSuccessful();
// ->assertRedirect(route('home'));
}
public function test_publish_new_plan_success(): void

View File

@@ -26,20 +26,19 @@ class ShowTest extends TestCase
public function setUp(): void
{
parent::setUp();
$this->refreshApplicationWithLocale('en');
Storage::fake('plans');
$this->image = UploadedFile::fake()->image('plan.png');
$this->user = User::factory()->create(['is_consultant' => true]);
$this->plan = Plan::inRandomOrder()->first();
$this->refreshApplicationWithLocale('en');
}
public function test_show_form_success()
public function test_show_page_success()
{
$response = $this->actingAs($this->user)
->get(route('plan.show', ['plan' => $this->plan->id]));
->get(route('plan.show', $this->plan, false));
$response
->assertOk();

View File

@@ -30,7 +30,7 @@ final class CreateTest extends TestCase
public function setUp(): void
{
parent::setUp();
$this->refreshApplicationWithLocale('en');
Storage::fake('recipes');
@@ -38,11 +38,9 @@ final class CreateTest extends TestCase
$this->user = User::factory()->create(['is_consultant' => true]);
$this->recipe = Recipe::factory()->make();
$this->refreshApplicationWithLocale('en');
}
public function testShowFormCreateRecipe(): void
public function test_show_page_create_recipe(): void
{
$response = $this
->actingAs($this->user)
@@ -51,7 +49,7 @@ final class CreateTest extends TestCase
$response->assertSuccessful();
}
public function testPublishNewRecipeSuccess(): void
public function test_publish_new_recipe_success(): void
{
$this->actingAs($this->user);
@@ -82,7 +80,7 @@ final class CreateTest extends TestCase
self::assertEquals($count + 1, Recipe::count());
}
public function testToDraftNewRecipeSuccess(): void
public function test_to_draft_new_recipe_success(): void
{
$this->actingAs($this->user);
@@ -115,7 +113,7 @@ final class CreateTest extends TestCase
self::assertEquals(Recipe::find($count + 1)->state, 'archived');
}
public function testToPreviewNewRecipeSuccess(): void
public function test_to_preview_new_recipe_success(): void
{
$this->actingAs($this->user);
@@ -148,7 +146,7 @@ final class CreateTest extends TestCase
self::assertEquals(Recipe::find($count + 1)->state, 'archived');
}
public function testSetEmptyData(): void
public function test_set_empty_data(): void
{
$this->actingAs($this->user);
@@ -169,7 +167,7 @@ final class CreateTest extends TestCase
self::assertEquals($count, Recipe::count());
}
public function testIncorrectVideoUrl(): void
public function test_incorrect_video_url(): void
{
$this->actingAs($this->user);
@@ -198,3 +196,4 @@ final class CreateTest extends TestCase
self::assertEquals($count, Recipe::count());
}
}

View File

@@ -22,22 +22,21 @@ final class EditFormTest extends TestCase
public function setUp(): void
{
parent::setUp();
$this->refreshApplicationWithLocale('en');
$this->user = User::factory()->create(['is_consultant' => true]);
$this->recipe = Recipe::inRandomOrder()->first();
$this->refreshApplicationWithLocale('en');
}
public function testShowFormEditRecipe(): void
public function test_edit_page_recipe_success(): void
{
$response = $this
->actingAs($this->user)
->get(route('recipe.edit', ['recipe' => $this->recipe->id]));
->get(route('recipe.edit', $this->recipe, false));
$response->assertSuccessful();
}
}

View File

@@ -17,14 +17,13 @@ class IndexTest extends TestCase
public function setUp(): void
{
parent::setUp();
$this->refreshApplicationWithLocale('en');
$this->user = User::factory()->create(['is_consultant' => true]);
$this->recipe = Recipe::inRandomOrder()->first();
$this->refreshApplicationWithLocale('en');
}
public function test_show_form_success()
public function test_index_page_success()
{
$response = $this
->actingAs($this->user)
@@ -34,3 +33,4 @@ class IndexTest extends TestCase
->assertOk();
}
}

View File

@@ -17,19 +17,19 @@ class ShowTest extends TestCase
public function setUp(): void
{
parent::setUp();
$this->refreshApplicationWithLocale('en');
$this->user = User::factory()->create(['is_consultant' => true]);
$this->recipe = Recipe::inRandomOrder()->first();
$this->refreshApplicationWithLocale('en');
}
public function test_show_form_success()
public function test_show_page_success()
{
$response = $this->actingAs($this->user)
->get(route('recipe.show', ['recipe' => $this->recipe->id]));
->get(route('recipe.show', $this->recipe, false));
$response
->assertOk();
}
}