Unverified Commit e32347a7 authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #104 from viralsolani/analysis-z37Bbr

Apply fixes from StyleCI
parents 1890b5bb e00d488d
...@@ -4,12 +4,12 @@ use App\Models\Page\Page; ...@@ -4,12 +4,12 @@ use App\Models\Page\Page;
use Faker\Generator as Faker; use Faker\Generator as Faker;
$factory->define(Page::class, function (Faker $faker) { $factory->define(Page::class, function (Faker $faker) {
$title = $faker->sentence; $title = $faker->sentence;
return [ return [
'title' => $title, 'title' => $title,
'page_slug' => str_slug($title), 'page_slug' => str_slug($title),
'description' => $faker->paragraph, 'description' => $faker->paragraph,
'created_by' => 1 'created_by' => 1,
]; ];
}); });
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
namespace Tests\Feature; namespace Tests\Feature;
use Tests\TestCase;
use App\Models\Page\Page; use App\Models\Page\Page;
use Illuminate\Foundation\Testing\WithFaker; use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ManagePageTest extends TestCase class ManagePageTest extends TestCase
{ {
...@@ -81,7 +79,6 @@ class ManagePageTest extends TestCase ...@@ -81,7 +79,6 @@ class ManagePageTest extends TestCase
->actingAs($this->admin) ->actingAs($this->admin)
->post(route('admin.pages.store'), $page->toArray()) ->post(route('admin.pages.store'), $page->toArray())
->assertSessionHasErrors('description'); ->assertSessionHasErrors('description');
} }
/** @test */ /** @test */
...@@ -107,14 +104,14 @@ class ManagePageTest extends TestCase ...@@ -107,14 +104,14 @@ class ManagePageTest extends TestCase
$page1['title'] = ''; $page1['title'] = '';
$page1['description'] = ''; $page1['description'] = '';
$this->withExceptionHandling() $this->withExceptionHandling()
->actingAs($this->admin) ->actingAs($this->admin)
->post(route('admin.pages.store'), $page1) ->post(route('admin.pages.store'), $page1)
->assertSessionHasErrors(['title', 'description']); ->assertSessionHasErrors(['title', 'description']);
$page2['title'] = ''; $page2['title'] = '';
$this->withExceptionHandling() $this->withExceptionHandling()
->actingAs($this->admin) ->actingAs($this->admin)
->post(route('admin.pages.store'), $page2) ->post(route('admin.pages.store'), $page2)
......
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