Skip to content

Conversation

@quanvh-0690
Copy link

@quanvh-0690 quanvh-0690 commented May 23, 2021

Purpose/Notes

Write PHP Unit Test Ex.03,04,06,07,09

Screenshot

Ảnh chụp Màn hình 2021-05-24 lúc 02 51 15

Checklist (*)

  • Pull request has been self-reviewed
  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All CI builds passed successfully (all builds are green)

@quanvh-0690 quanvh-0690 changed the title [QuanVH] Write PHP Unit Test Ex.03,04,06,07,10 [QuanVH] Write PHP Unit Test Ex.03,04,06,07,09 May 23, 2021

public function test_index_success()
{
$response = $this->controller->index();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ở đây nếu dùng integration test được thì tốt hơn nhưng làm thế này cũng ok

$this->assertEquals([
'bill' => 'required|integer|min:0',
'has_watch' => 'nullable|boolean',
], $this->request->rules());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants