File manager - Edit - /var/www/html/gop/api/tests/Feature/EnderecoTest.php
Back
<?php namespace Tests\Feature; use App\Models\Endereco; use Illuminate\Http\JsonResponse; use Tests\BaseTest; class EnderecoTest extends BaseTest { public function test_index() { Endereco::factory(10)->create(); $this->authRequest( 'get', route('endereco.index'), ); } public function test_store() { $enderecoArray = Endereco::factory()->make()->toArray(); $response = $this->authRequest( 'post', route('endereco.store'), JsonResponse::HTTP_CREATED, $enderecoArray, ); } public function test_show() { $endereco = Endereco::factory()->create(); $response = $this->authRequest( 'get', route('endereco.show', $endereco->id), ); } public function test_update() { $endereco = Endereco::factory()->create(); $enderecoArray = Endereco::factory()->make()->toArray(); $response = $this->authRequest( 'put', route('endereco.update', $endereco->id), JsonResponse::HTTP_OK, $enderecoArray, ); } public function test_destroy() { $endereco = Endereco::factory()->create(); $response = $this->authRequest( 'delete', route('endereco.destroy', $endereco->id), JsonResponse::HTTP_NO_CONTENT, ); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings