-
Notifications
You must be signed in to change notification settings - Fork 46
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
assertInternalType() #34
Comments
What’s $this in that case?
On Tue, 25 Dec 2018 at 16:55, Joseph Zidell ***@***.***> wrote:
I'm using Codeception's wrapper
<https://github.com/Codeception/Codeception/blob/2.5/src/Codeception/Util/Shared/Asserts.php#L448-L451>
of PHPUnit's assertInternalType
<https://github.com/sebastianbergmann/phpunit/blob/master/src/Framework/Assert.php#L1677>,
and thought phpstan would understand the type.
Example code:
$feedHandle = fopen('php://temp', 'rw+');
$this->assertInternalType('resource', $feedHandle);
fwrite($feedHandle, $feed);
Actual result:
Parameter #1 $fp of function fwrite expects resource, resource|false given.
Expected result:
-- Nothing --
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/phpstan/phpstan/issues/1734>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGZuPhkbMaRNLFmTLgg0FuLiX_B_z9rks5u8kpsgaJpZM4ZhI_u>
.
--
Ondřej Mirtes
|
One of:
|
In the second case, there are a few layers of wrapper paper, all using the same method name and signature. |
In the first case, the installation of phpstan/phpstan-phpunit extension
should be sufficient. Second case is not currently supported, but should be
easy to add.
On Tue, 25 Dec 2018 at 17:05, Joseph Zidell ***@***.***> wrote:
In the second case, there are a few layers of wrapper paper, all using the
same method name and signature.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/phpstan/phpstan/issues/1734#issuecomment-449860388>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGZuJFNQd5RtlsqUUIpi7BhcuuZN-AXks5u8kzRgaJpZM4ZhI_u>
.
--
Ondřej Mirtes
|
OK, will give it a whirl |
You need to make
Then you need to specify the class in those services here (as part of Once this change is merged, you will be able to register these services in your own |
I'm using Codeception's wrapper of PHPUnit's
assertInternalType
, and thought phpstan would understand the type.Example code:
Actual result:
Expected result:
-- Nothing --
The text was updated successfully, but these errors were encountered: