-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Start using assert() and not fail() #5063
[WIP] Start using assert() and not fail() #5063
Conversation
src/Codeception/Module/Laravel5.php
Outdated
if ($currentNum != $expectedNum) { | ||
$this->fail("The number of found $table ($currentNum) does not match expected number $expectedNum with " . json_encode($attributes)); | ||
} | ||
$this->assertEquals($expectedNum, $currentNum, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Opening parenthesis of a multi-line function call must be the last content on the line
- Only one argument is allowed per line in a multi-line function call
src/Codeception/Module/Laravel5.php
Outdated
$this->fail("The number of found $table ($currentNum) does not match expected number $expectedNum with " . json_encode($attributes)); | ||
} | ||
$this->assertEquals($expectedNum, $currentNum, | ||
"The number of found $table ($currentNum) does not match expected number $expectedNum with " . json_encode($attributes)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Multi-line function call not indented correctly; expected 12 spaces but found 16
- Closing parenthesis of a multi-line function call must be on a line by itself
src/Codeception/Module/Laravel5.php
Outdated
if ($currentNum != $expectedNum) { | ||
$this->fail("The number of found records ($currentNum) does not match expected number $expectedNum in table $table with " . json_encode($attributes)); | ||
} | ||
$this->assertEquals($expectedNum, $currentNum, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Opening parenthesis of a multi-line function call must be the last content on the line
- Only one argument is allowed per line in a multi-line function call
src/Codeception/Module/Laravel5.php
Outdated
$this->fail("The number of found records ($currentNum) does not match expected number $expectedNum in table $table with " . json_encode($attributes)); | ||
} | ||
$this->assertEquals($expectedNum, $currentNum, | ||
"The number of found records ($currentNum) does not match expected number $expectedNum in table $table with " . json_encode($attributes)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Multi-line function call not indented correctly; expected 12 spaces but found 16
- Closing parenthesis of a multi-line function call must be on a line by itself
Thanks |
haha, this PR was "work in progress".. i would have added additional asserts.. 😆 |
This PR changes the
Laravel5
module in order to useassert()
rather thanfail()
to indicate if something worked / did not work..Note that this PR is "work in progress"..