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