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

[11.x] Add some tests and improvement test coverage for Str::camel #51308

Merged
merged 1 commit into from
May 6, 2024

Conversation

saMahmoudzadeh
Copy link
Contributor

This PR , adds some tests to enhance test coverage.

  • Check empty string
 $this->assertSame('', Str::camel(''));
  • When all characters are uppercase
$this->assertSame('lARAVELPHPFRAMEWORK', Str::camel('LARAVEL_PHP_FRAMEWORK'));
  • When there are leading and trailing spaces in a string.
 $this->assertSame('laravelPhpFramework', Str::camel('   laravel   php   framework   '));
  • When there is a numeric character in the middle or at the beginning of the string
$this->assertSame('foo1Bar', Str::camel('foo1_bar'));
$this->assertSame('1FooBar', Str::camel('1 foo bar'));

@taylorotwell taylorotwell merged commit 7161dff into laravel:11.x May 6, 2024
30 checks passed
@saMahmoudzadeh saMahmoudzadeh deleted the test/str-test branch May 6, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants