![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mcoil.corals.io/tests/Feature/Admin/Provinces/ |
<?php namespace Tests\Feature\Admin\Provinces; use App\Shop\Countries\Country; use App\Shop\Provinces\Province; use Tests\TestCase; class ProvinceFeatureTest extends TestCase { /** @test */ public function it_can_update_the_province() { $country = factory(Country::class)->create(); $province = factory(Province::class)->create([ 'country_id' => $country->id ]); $this ->actingAs($this->employee, 'employee') ->put(route('admin.countries.provinces.update', [$country->id, $province->id]), ['name' => 'test']) ->assertStatus(302) ->assertRedirect(route('admin.countries.provinces.edit', [$country->id, $province->id])) ->assertSessionHas('message', 'Update successful'); } /** @test */ public function it_can_show_the_edit_form() { $country = factory(Country::class)->create(); $province = factory(Province::class)->create([ 'country_id' => $country->id ]); $this ->actingAs($this->employee, 'employee') ->get(route('admin.countries.provinces.edit', [$country->id, $province->id])) ->assertStatus(200) ->assertSee($province->name); } /** @test */ public function it_can_show_the_province() { $country = factory(Country::class)->create(); $province = factory(Province::class)->create([ 'country_id' => $country->id ]); $this ->actingAs($this->employee, 'employee') ->get(route('admin.countries.provinces.show', [$country->id, $province->id])) ->assertStatus(200) ->assertSee($province->name); } }