-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[String] add test case for unwrap method #35234
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.
(for 5.0)
public function testUnwrap() | ||
{ | ||
$expected = ['hello', 'world']; | ||
$actual = UnicodeString::unwrap([new UnicodeString('hello'), new UnicodeString('world')]); |
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.
One more thing: the shouldn't hardcode UnicodeString
instead, the name of the class should be variable.
See the test case just below for wrap(), it does it already.
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.
so can i fix it or this pr is not useful ?
|
||
$s = static::createFromString(''); | ||
|
||
$actual = $s::unwrap(['hello', 'world']); |
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.
$actual = $s::unwrap([static::createFromString('hello'), static::createFromString('world')]);
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.
yes it's done , sorry for my mistake . It's first PR here :)
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.
Thank you and congrats for your first PR!
Thank you @mgamal92. |
just test case for
unwrap()
method has been added