solidworx / idea-php-phake-plugin Goto Github PK
View Code? Open in Web Editor NEWIntelliJ IDEA / PhpStorm Plugin for Phake mocking framework
License: MIT License
IntelliJ IDEA / PhpStorm Plugin for Phake mocking framework
License: MIT License
First of all thanks for creating the plugin !!!
Will there be any chance to get this work on the latest PhpStorm version ?
Sry for taking too long here are the issues in more details:
Phake Annotation:
Phake brings the feature that you can use annotation for mocking.
E.g.
#[\Phake\Mock]
private YourClassThatYouWantToMock $class;
and you will need to put this on your setUp Method:
\Phake::initAnnotations($this);
Unfortunately the plugin does not recognize the Annotation (see screenshot):
and if I import this the IDE will call "Import is not used" as you can see here:
Mock class method auto completion:
Lets say we have the following class that we want to mock:
class foo
{
public function getBar(): string
{
return 'foo';
}
}
I use the phake mock annotation to mock this class. (Also I could do this with the Phake::mock(...)
#[\Phake\Mock]
private Foo $foo;
I really would love to see a autocompletion for methods of mocked classes as in PHPUnit.
Here I would expect the getBar() Method as suggestion.
These are just minor issues as I already said Im really grateful for this plugin and with that I wanna say thank you again ;)
PS: Regarding to Phake Annotation I can`t say if this is a Plugin problem or a problem with the package itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.