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

[PHPUnit] foreach assertInternalType() to assertContainsOnly() #850

Closed
TomasVotruba opened this issue Dec 16, 2018 · 2 comments
Closed

[PHPUnit] foreach assertInternalType() to assertContainsOnly() #850

TomasVotruba opened this issue Dec 16, 2018 · 2 comments

Comments

@TomasVotruba
Copy link
Member

TomasVotruba commented Dec 16, 2018

-foreach ($types as $type) {
-    $this->assertInternalType('string', $type);
-}
+$this->assertContainsOnly('string', $types);

Originally posted by @carusogabriel in #115 (comment)

@TomasVotruba
Copy link
Member Author

This might be possibly deprecated in future PHPUnit, since assertInternalType is about to be removed and moving to exact ones:

sebastianbergmann/phpunit#3368

@TomasVotruba TomasVotruba changed the title [PHPUnit] foraech assertInternalType() to assertContainsOnly() [PHPUnit] foreach assertInternalType() to assertContainsOnly() Dec 31, 2018
@TomasVotruba
Copy link
Member Author

There is no upgrade path needed yet

TomasVotruba added a commit that referenced this issue Sep 8, 2021
rectorphp/rector-src@8cb3c74 [TypeDeclaration] Rename fixture skip tests on ReturnTypeDeclarationRector (#850)
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

No branches or pull requests

1 participant