Created
August 3, 2020 06:00
-
-
Save fwartner/f8f281a45da6b518a90847d7529bb9c7 to your computer and use it in GitHub Desktop.
HTTP Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Feature\Http\Controllers\Blog; | |
use App\Http\Controllers\Blog\PostController; | |
use Tests\TestCase; | |
/** | |
* Class PostControllerTest. | |
* | |
* @covers \App\Http\Controllers\Blog\PostController | |
*/ | |
class PostControllerTest extends TestCase | |
{ | |
/** | |
* @var PostController | |
*/ | |
protected $postController; | |
/** | |
* {@inheritdoc} | |
*/ | |
protected function setUp(): void | |
{ | |
parent::setUp(); | |
/** @todo Correctly instantiate tested object to use it. */ | |
$this->postController = new PostController(); | |
$this->app->instance(PostController::class, $this->postController); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
protected function tearDown(): void | |
{ | |
parent::tearDown(); | |
unset($this->postController); | |
} | |
public function testIndex(): void | |
{ | |
/** @todo This test is incomplete. */ | |
$this->get('/path') | |
->assertStatus(200); | |
} | |
public function testCreate(): void | |
{ | |
/** @todo This test is incomplete. */ | |
$this->get('/path') | |
->assertStatus(200); | |
} | |
public function testStore(): void | |
{ | |
/** @todo This test is incomplete. */ | |
$this->post('/path', [ /* data */ ]) | |
->assertStatus(200); | |
} | |
public function testShow(): void | |
{ | |
/** @todo This test is incomplete. */ | |
$this->get('/path') | |
->assertStatus(200); | |
} | |
public function testEdit(): void | |
{ | |
/** @todo This test is incomplete. */ | |
$this->get('/path') | |
->assertStatus(200); | |
} | |
public function testUpdate(): void | |
{ | |
/** @todo This test is incomplete. */ | |
$this->put('/path', [ /* data */ ]) | |
->assertStatus(200); | |
} | |
public function testDestroy(): void | |
{ | |
/** @todo This test is incomplete. */ | |
$this->delete('/path') | |
->assertStatus(200); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment