Skip to content

[NganLTB] Issue #3 Test C0#8

Open
nganltb-1258 wants to merge 2 commits intosun7pro:masterfrom
nganltb-1258:Issue_#3_Test_C0
Open

[NganLTB] Issue #3 Test C0#8
nganltb-1258 wants to merge 2 commits intosun7pro:masterfrom
nganltb-1258:Issue_#3_Test_C0

Conversation

@nganltb-1258
Copy link
Copy Markdown

Purpose/Notes (*)

(E.g. Add tests for class, add docs...)

Coverage (*)

(PHPUnit coverage screenshot)
image

Checklist (*)

  • Pull request has been self-reviewed
  • Pull request has a meaningful description of its purpose
  • Pull request has screenshot of phpunit coverage

class UsernameValidationTest extends TestCase
{
// TODO: write 6 tests to coverage 100% code
public function test_return_false_when_user_name_lt_min_length_is_valid_test()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Các test case của e có thêm hậu tố _is_valid_test để làm gì nhể? Để biết là đang test method isValid() hả. Theo anh thì không cần nhé, coi cả class là 1 unit, chúng ta đang đi test hành vi (public api) của class

$this->assertFalse($sut->wasProcess4Called());
}

public function test_return_2_WHEN_pass_case_2_case_4_run_test()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mặc dù 100% code coverage, nhưng rõ là chưa đủ test case cho nó nhỉ :D

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Đã đủ đk cover C0 nhưng chưa đủ các test case

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.

3 participants