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