[NhiTT] Do UT For Ex3 to Ex7#41
Open
nhitt-1337 wants to merge 1 commit intosun-unit-test-training:masterfrom
Open
[NhiTT] Do UT For Ex3 to Ex7#41nhitt-1337 wants to merge 1 commit intosun-unit-test-training:masterfrom
nhitt-1337 wants to merge 1 commit intosun-unit-test-training:masterfrom
Conversation
lebaongan
reviewed
May 30, 2021
| $this->assertEquals($response->getStatusCode(), 200); | ||
| $this->assertEquals($response->getData()->discount, $discount); | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Chị ơi cái này em chưa thấy test mấy case và validate fail ạ
| $this->assertEquals($resultClass, $class); | ||
| } | ||
|
|
||
| public function dateForClass() |
There was a problem hiding this comment.
dạ cái này suggest comment ko cần sửa ạ:
nên đặt tên hàm là proivder....
Với lị mỗi test case thế này nên chia ra một function ạ.
| * @param $shippingExpress | ||
| * @param $result | ||
| */ | ||
| public function testCalculateShippingFee($amount, $premiumMember, $shippingExpress, $result) |
There was a problem hiding this comment.
cái này nếu test đến C1 thì ít nhất 4 case ạ
- shippingFee = 0
shippingExpressFee = 0 - shippingFee = 0
shippingExpressFee > 0 - shippingFee > 0
shippingExpressFee = 0 - shippingFee > 0
shippingExpressFee > 0
chị update giúp em hây
| $this->assertEquals('exercise07::checkout.index', $view->name()); | ||
| } | ||
|
|
||
| function testStore() |
There was a problem hiding this comment.
Cái này nên đặt tên là test Store success ... rồi chị bổ sung giúp em một case test validate fail thì nó sẽ như thế nào nhé
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose/Notes
Screenshot
Checklist (*)