Giter Site home page Giter Site logo

idea-php-phake-plugin's People

Contributors

actions-user avatar dependabot[bot] avatar pierredup avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

idea-php-phake-plugin's Issues

Phake annotation recognition and mock class method completion

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):
undefined class Mock

and if I import this the IDE will call "Import is not used" as you can see here:
mock_package is not used

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.
missing autocompletion for mock class foo

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.