Comments (10)
Should be just a matter of updating the stubs: https://github.com/phpstan/phpstan-mockery/blob/master/stubs/MockInterface.stub
from phpstan-mockery.
So that isn't supported in the current stub that comes with this package?
from phpstan-mockery.
Nope, string[] ...$methodNames
means that the variadic argument accepts string
.
from phpstan-mockery.
Are you planning to update the stub to use string[]|array
to match the signature of the LegacyMockInterface?
from phpstan-mockery.
@wimski You can send a PR by yourself :) I'd recommend string[]|array<array<string, mixed>>
.
from phpstan-mockery.
I will, but shouldn't it be string|array<string, mixed> ...$methodNames
?
// LegacyMockInterface
/**
* Set expected method calls
*
* @param string|array ...$methodNames one or many methods that are expected to be called in this mock
*
* @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage
*/
public function shouldReceive(...$methodNames);
from phpstan-mockery.
Try and test it.
from phpstan-mockery.
from phpstan-mockery.
Fixed by #24.
from phpstan-mockery.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from phpstan-mockery.
Related Issues (19)
- Expects Mockery\Expectation, PHPStan\Mockery\Type\Expects given.
- Call to an undefined method Mockery\ExpectationInterface|Mockery\ExpectsHigherOrderMessage::once() HOT 3
- PHPStan 0.12 compatible HOT 2
- Call to method PHPStan\Mockery\Type\Expects::never() on a separate line has no effect. HOT 13
- PHPStan reports error when using alternative syntax of shouldReceive method HOT 3
- Call to protected method xxx()
- New release for phpstan 0.12? HOT 5
- Infer mock type when defined in setUp HOT 5
- Some currently unsupported cases HOT 3
- Calling PHPStan\Mockery\Type\Expects::with() is not covered by backward compatibility promise. HOT 6
- Mockery::spy(function) should be callable HOT 1
- Call to an undefined method xxx::shouldReceive() HOT 2
- Dependency Dashboard
- Missing mock type information for Mockery\Expectation::getMock() HOT 1
- Incorrect doc blocks for shouldHaveReceived and shouldNotHaveReceived HOT 3
- Require unit tests to call `Mockery::close()` or use `MockeryPHPUnitIntegration` trait HOT 2
- Support makePartial() HOT 4
- Call to an undefined method Mockery\Expectation::shouldReceive() after chaining onto `andReturn` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpstan-mockery.