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

Add Tests for Str::pluralPascal Method #54957

Merged

Conversation

mohammadrasoulasghari
Copy link
Contributor

Add Tests for Str::pluralPascal Method

This PR adds comprehensive tests for the Str::pluralPascal method which previously had no test coverage. The tests validate the method’s behavior across several scenarios to ensure it functions correctly.

Test Coverage 🔍

The tests verify three key aspects of the pluralPascal method:

  1. ✅ Basic functionality with default count parameter (converting Pascal case singular words to plural)
  2. ✅ Behavior with different numeric count values (0, 1, 2) to ensure proper singular/plural handling
  3. ✅ Support for complex types like empty arrays and Countable objects

🎯 Test Coverage Achievement

I've thoroughly reviewed the entire Str class and with the merging of previous PR (#54930), and this one, every single method in the class now has test coverage. This PR completes our testing journey by adding coverage for the last untested method. 🎉

Test the method's ability to convert singular Pascal case strings to plural form.
@mohammadrasoulasghari mohammadrasoulasghari force-pushed the test/str-test-methods branch 5 times, most recently from b61843f to a9be671 Compare March 10, 2025 02:55
Test pluralPascal behavior with different count values (0, 1, 2),
arrays and Countable objects to ensure comprehensive coverage.
@taylorotwell taylorotwell merged commit 80af327 into laravel:12.x Mar 10, 2025
39 checks passed
@mohammadrasoulasghari mohammadrasoulasghari deleted the test/str-test-methods branch March 10, 2025 17:20
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