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