-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
PHPUnit 10 Shift #155
PHPUnit 10 Shift #155
Conversation
From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type: - `setUpBeforeClass()` - `setUp()` - `assertPreConditions()` - `assertPostConditions()` - `tearDown()` - `tearDownAfterClass()` - `onNotSuccessfulTest()` [1]: https://phpunit.de/announcements/phpunit-8.html
|
|
ℹ️ PHPUnit has documented using return types for test cases and data providers since PHPUnit 8. In an effort to modernize your test suite, Shift added a return type of Shift understands developers have different preferences when it comes to type hints. If you do not wish to add return types, you may undo this change by running: |
ℹ️ PHPUnit has documented declaring test classes as Shift understands developers have different preferences when it comes to using |
|
⚗️ This Shift is still being refined. Please report any issues or suggestions to [email protected]. Your feedback is what helps improve the experience for everyone. |
class AvatarLaravelTest extends \PHPUnit\Framework\TestCase | ||
use PHPUnit\Framework\Attributes\Test; | ||
|
||
final class AvatarLaravelTest extends \PHPUnit\Framework\TestCase |
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.
Each class must be in a namespace of at least one level (a top-level vendor name)
*/ | ||
public function it_can_override_attributes_when_instantiated() | ||
#[Test] | ||
public function it_can_override_attributes_when_instantiated(): void |
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.
Method name AvatarLaravelTest::it_can_override_attributes_when_instantiated
is not in camel caps format
*/ | ||
public function it_have_no_border_radius_as_default() | ||
#[Test] | ||
public function it_have_no_border_radius_as_default(): void |
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.
Method name AvatarLaravelTest::it_have_no_border_radius_as_default
is not in camel caps format
*/ | ||
public function it_can_override_attributes_after_set_name() | ||
#[Test] | ||
public function it_can_override_attributes_after_set_name(): void |
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.
Method name AvatarLaravelTest::it_can_override_attributes_after_set_name
is not in camel caps format
*/ | ||
public function it_has_correct_random_background() | ||
#[Test] | ||
public function it_has_correct_random_background(): void |
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.
Method name AvatarLaravelTest::it_has_correct_random_background
is not in camel caps format
*/ | ||
public function it_has_different_random_background() | ||
#[Test] | ||
public function it_has_different_random_background(): void |
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.
Method name AvatarLaravelTest::it_has_different_random_background
is not in camel caps format
class AvatarPhpTest extends \PHPUnit\Framework\TestCase | ||
use PHPUnit\Framework\Attributes\Test; | ||
|
||
final class AvatarPhpTest extends \PHPUnit\Framework\TestCase |
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.
Each class must be in a namespace of at least one level (a top-level vendor name)
*/ | ||
public function it_can_override_attributes_when_instantiated() | ||
#[Test] | ||
public function it_can_override_attributes_when_instantiated(): void |
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.
Method name AvatarPhpTest::it_can_override_attributes_when_instantiated
is not in camel caps format
*/ | ||
public function it_can_override_attributes_after_set_name() | ||
#[Test] | ||
public function it_can_override_attributes_after_set_name(): void |
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.
Method name AvatarPhpTest::it_can_override_attributes_after_set_name
is not in camel caps format
*/ | ||
public function it_has_correct_random_background() | ||
#[Test] | ||
public function it_has_correct_random_background(): void |
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.
Method name AvatarPhpTest::it_has_correct_random_background
is not in camel caps format
*/ | ||
public function it_has_different_random_background() | ||
#[Test] | ||
public function it_has_different_random_background(): void |
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.
Method name AvatarPhpTest::it_has_different_random_background
is not in camel caps format
*/ | ||
public function it_can_resolve_random_themes_and_then_overrides() | ||
#[Test] | ||
public function it_can_resolve_random_themes_and_then_overrides(): void |
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.
Method name AvatarPhpTest::it_can_resolve_random_themes_and_then_overrides
is not in camel caps format
*/ | ||
public function it_can_handle_invalid_theme() | ||
#[Test] | ||
public function it_can_handle_invalid_theme(): void |
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.
Method name AvatarPhpTest::it_can_handle_invalid_theme
is not in camel caps format
*/ | ||
public function it_can_create_initials_from_name() | ||
#[Test] | ||
public function it_can_create_initials_from_name(): void |
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.
Method name AvatarPhpTest::it_can_create_initials_from_name
is not in camel caps format
*/ | ||
public function it_can_set_chars_length() | ||
#[Test] | ||
public function it_can_set_chars_length(): void |
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.
Method name AvatarPhpTest::it_can_set_chars_length
is not in camel caps format
*/ | ||
public function it_accept_valid_font_file() | ||
#[Test] | ||
public function it_accept_valid_font_file(): void |
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.
Method name AvatarPhpTest::it_accept_valid_font_file
is not in camel caps format
*/ | ||
public function it_cannot_accept_invalid_font_file() | ||
#[Test] | ||
public function it_cannot_accept_invalid_font_file(): void |
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.
Method name AvatarPhpTest::it_cannot_accept_invalid_font_file
is not in camel caps format
*/ | ||
public function it_can_generate_base64() | ||
#[Test] | ||
public function it_can_generate_base64(): void |
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.
Method name AvatarPhpTest::it_can_generate_base64
is not in camel caps format
*/ | ||
public function it_can_generate_base64_from_cache() | ||
#[Test] | ||
public function it_can_generate_base64_from_cache(): void |
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.
Method name AvatarPhpTest::it_can_generate_base64_from_cache
is not in camel caps format
*/ | ||
public function it_can_generate_file() | ||
#[Test] | ||
public function it_can_generate_file(): void |
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.
Method name AvatarPhpTest::it_can_generate_file
is not in camel caps format
*/ | ||
public function it_can_generate_circle_svg() | ||
#[Test] | ||
public function it_can_generate_circle_svg(): void |
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.
Method name AvatarPhpTest::it_can_generate_circle_svg
is not in camel caps format
*/ | ||
public function it_can_generate_rectangle_svg() | ||
#[Test] | ||
public function it_can_generate_rectangle_svg(): void |
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.
Method name AvatarPhpTest::it_can_generate_rectangle_svg
is not in camel caps format
*/ | ||
public function it_can_generate_svg_with_custom_font_family() | ||
#[Test] | ||
public function it_can_generate_svg_with_custom_font_family(): void |
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.
Method name AvatarPhpTest::it_can_generate_svg_with_custom_font_family
is not in camel caps format
*/ | ||
public function it_can_use_the_foreground_color_for_the_svg_border() | ||
#[Test] | ||
public function it_can_use_the_foreground_color_for_the_svg_border(): void |
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.
Method name AvatarPhpTest::it_can_use_the_foreground_color_for_the_svg_border
is not in camel caps format
*/ | ||
public function it_can_use_the_background_color_for_the_svg_border() | ||
#[Test] | ||
public function it_can_use_the_background_color_for_the_svg_border(): void |
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.
Method name AvatarPhpTest::it_can_use_the_background_color_for_the_svg_border
is not in camel caps format
*/ | ||
public function it_can_generate_gravatar() | ||
#[Test] | ||
public function it_can_generate_gravatar(): void |
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.
Method name AvatarPhpTest::it_can_generate_gravatar
is not in camel caps format
*/ | ||
public function it_can_generate_gravatar_with_size() | ||
#[Test] | ||
public function it_can_generate_gravatar_with_size(): void |
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.
Method name AvatarPhpTest::it_can_generate_gravatar_with_size
is not in camel caps format
*/ | ||
public function it_can_generate_gravatar_with_default() | ||
#[Test] | ||
public function it_can_generate_gravatar_with_default(): void |
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.
Method name AvatarPhpTest::it_can_generate_gravatar_with_default
is not in camel caps format
*/ | ||
public function it_can_generate_gravatar_with_default_and_rating() | ||
#[Test] | ||
public function it_can_generate_gravatar_with_default_and_rating(): void |
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.
Method name AvatarPhpTest::it_can_generate_gravatar_with_default_and_rating
is not in camel caps format
*/ | ||
public function it_can_generate_gravatar_with_size_overriden() | ||
#[Test] | ||
public function it_can_generate_gravatar_with_size_overriden(): void |
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.
Method name AvatarPhpTest::it_can_generate_gravatar_with_size_overriden
is not in camel caps format
*/ | ||
public function it_can_set_background() | ||
#[Test] | ||
public function it_can_set_background(): void |
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.
Method name AvatarPhpTest::it_can_set_background
is not in camel caps format
*/ | ||
public function it_can_set_foreground() | ||
#[Test] | ||
public function it_can_set_foreground(): void |
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.
Method name AvatarPhpTest::it_can_set_foreground
is not in camel caps format
*/ | ||
public function it_can_set_dimension() | ||
#[Test] | ||
public function it_can_set_dimension(): void |
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.
Method name AvatarPhpTest::it_can_set_dimension
is not in camel caps format
*/ | ||
public function it_can_set_font_size() | ||
#[Test] | ||
public function it_can_set_font_size(): void |
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.
Method name AvatarPhpTest::it_can_set_font_size
is not in camel caps format
*/ | ||
public function it_can_set_font_family() | ||
#[Test] | ||
public function it_can_set_font_family(): void |
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.
Method name AvatarPhpTest::it_can_set_font_family
is not in camel caps format
*/ | ||
public function it_can_set_border() | ||
#[Test] | ||
public function it_can_set_border(): void |
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.
Method name AvatarPhpTest::it_can_set_border
is not in camel caps format
*/ | ||
public function it_can_set_border_radius() | ||
#[Test] | ||
public function it_can_set_border_radius(): void |
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.
Method name AvatarPhpTest::it_can_set_border_radius
is not in camel caps format
*/ | ||
public function it_can_accept_valid_shape() | ||
#[Test] | ||
public function it_can_accept_valid_shape(): void |
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.
Method name AvatarPhpTest::it_can_accept_valid_shape
is not in camel caps format
*/ | ||
public function it_throw_exception_for_invalid_shape() | ||
#[Test] | ||
public function it_throw_exception_for_invalid_shape(): void |
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.
Method name AvatarPhpTest::it_throw_exception_for_invalid_shape
is not in camel caps format
*/ | ||
public function it_can_get_raw_image_object() | ||
#[Test] | ||
public function it_can_get_raw_image_object(): void |
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.
Method name AvatarPhpTest::it_can_get_raw_image_object
is not in camel caps format
This pull request contains changes for upgrading to PHPUnit 10 automated by the PHPUnit 10 Shift.
Before merging, you need to:
shift-115119
branchcomposer update
(if the scripts fail, try with--no-scripts
)vendor/bin/phpunit
If there were changes you felt could have been automated, please reply to the follow-up email with your feedback or on Twitter.