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

Fix autocomplete on mock objects #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vdechenaux
Copy link
Member

Related to #43 but it doesn't fix it 😞

Before:
image
image

After:
image
image


@Override
public char getKey() {
return '\u0102';
Copy link
Member Author

@vdechenaux vdechenaux Oct 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your custom signature key, i.e. "Я"

https://confluence.jetbrains.com/display/PhpStorm/PHP+Open+API

I checked other projects, like here https://github.com/Haehnchen/idea-php-symfony2-plugin/blob/a3fa7ef7c3d5a57be2a7130cf831d44d7760ea1e/src/fr/adrienbrault/idea/symfony2plugin/doctrine/ObjectManagerFindTypeProvider.java and they seems to use random unicode character.
I used Ă ( 'A' for atoum and it looks like the atoum logo with the horns 😛 )


if (ref != null && ref.getFQN() != null && ref.getFQN().startsWith("\\mock\\")) {
return new PhpType().add(ref.getFQN().substring("\\mock".length()));
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the element which need type resolution is a class with FQN like \mock\xxxxxx we return the class \xxxxxx

@vdechenaux
Copy link
Member Author

@agallou Je viens d'ajouter un commit 291615d pour ce qu'on s'était dis ( http://docs.atoum.org/fr/latest/mocking_systems.html#generer-un-mock-avec-newmockinstance )

@agallou
Copy link
Member

agallou commented Nov 13, 2017

@vdechenaux j'ai commencé à tester la PR. La version avec laquelle je builde actuellement le plugin ne supporte pas le PhpTypeProvider3. Du coup je vais chercher quelle version minimum utiliser pour l'indiquer dans le fichier META-INF/plugin.xml?

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

Successfully merging this pull request may close these issues.

2 participants