-
Notifications
You must be signed in to change notification settings - Fork 0
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
[18] - implements koans solutions #19
[18] - implements koans solutions #19
Conversation
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.
Ok to merge, be careful with the structure of the name of the PR the first one is always capitalized
|
||
// Create a ForEach Loop to pass the test | ||
$result = ''; | ||
foreach ($age as $key => $value){ |
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.
Maybe you can refactor the names of the forEach
foreach ($age as $key => $value){
->
foreach ($people as $name => $age){
// Create a ForEach Loop to pass the test | ||
$result = ''; | ||
foreach ($age as $key => $value){ | ||
$result .= "Key= $key, Value= $value ; "; |
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.
What do you think if we change the answer to make it look better?
"Key = $key, Value = $value ; "
} | ||
|
||
// Extract Joe´s Age | ||
$this->assertEquals($result, "Key= Joe, Value= 49 ; Key= Mike, Value= 27 ; Key= Charles, Value= 32 ; "); |
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.
This changes
* @test | ||
* @testdox Some ways of asserting equality are better than others | ||
*/ | ||
public function checkHowMuchIsOnePlusOneUsingVariablesAndAssertEquals() |
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.
This test and checkHowMuchIsOnePlusOne(2 above) they are not repetitive
Issue
Solution
Notes