tests/Feature/ContactoControllerTest.php
/**
     * A basic feature test example.
     *
     * @return void
     */
A basic feature test example.
@return void
A basic feature test example . @return void
public function testCreateContacto()
    {
        $cliente = factory(Cliente::class)->create();
        $response = $this->get('/contacto/create/'.$cliente->id);
        $response->assertStatus(200);
        $response->assertViewIs('contacto.form');
        $response->assertViewHasAll(['contacto','cliente_id','ciudades','oficinas']);
    }
public function testCreateContacto ( ) { $ cliente = factory ( Cliente :: class ) -> create ( ) ; $ response = $ this -> get ( '/contacto/create/' . $ cliente -> id ) ; $ response -> assertStatus ( 200 ) ; $ response -> assertViewIs ( 'contacto.form' ) ; $ response -> assertViewHasAll ( [ 'contacto' , 'cliente_id' , 'ciudades' , 'oficinas' ] ) ; }
A basic feature test example.
A basic feature test example .