Skip to content
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

Merged
merged 1 commit into from
Jan 7, 2020
Merged

[String] add test case for unwrap method #35234

merged 1 commit into from
Jan 7, 2020

Conversation

mgamal92
Copy link
Contributor

@mgamal92 mgamal92 commented Jan 6, 2020

Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
License MIT

just test case for unwrap() method has been added

@nicolas-grekas nicolas-grekas added this to the 5.0 milestone Jan 6, 2020
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

(for 5.0)

@nicolas-grekas nicolas-grekas changed the title add test case for unwrap method [String] add test case for unwrap method Jan 6, 2020
public function testUnwrap()
{
$expected = ['hello', 'world'];
$actual = UnicodeString::unwrap([new UnicodeString('hello'), new UnicodeString('world')]);
Copy link
Member

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.

Copy link
Contributor Author

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']);
Copy link
Member

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')]);

Copy link
Contributor Author

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 :)

Copy link
Member

@nicolas-grekas nicolas-grekas left a 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!

@fabpot
Copy link
Member

fabpot commented Jan 7, 2020

Thank you @mgamal92.

@fabpot fabpot closed this in a1c3f55 Jan 7, 2020
@fabpot fabpot merged commit 3e0c988 into symfony:master Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants