idea-php-phpunit-plugin
idea-php-phpunit-plugin copied to clipboard
IntelliJ IDEA / PhpStorm PHPUnit Enhancement Plugin
I have a class Foo with several methods. Some return built-in types (bool, string), others return objects (class Bar). It seems like when prophesizing Foo, this plugin works for the...
When defining the type for a property or a return type holding an ObjectProphecy, the right way to document that is `ObjectProphecy`, not `ObjectProphecy|Foo` (which would make SA tools complain...
Codeception is a testing framework which is wrapping PHPUnit to get some additional convienience features. Because of the PHPUnit backend it is no problem to use Prophecy. But its not...
When a prophecy is used in the same method, the plugin seems to help PhpStorm understand that the return types of the mocked object are actually returning method prophecies, as...
Having this exception: ``` java.lang.Throwable: Assert: must be called on EDT at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202) at com.intellij.util.ui.EDT.assertIsEdt(EDT.java:68) at com.intellij.codeInsight.hint.LocalHintManager.getHintPosition(LocalHintManager.java:324) at com.intellij.codeInsight.hint.HintManagerImpl.showErrorHint(HintManagerImpl.java:434) at com.intellij.codeInsight.hint.HintManagerImpl.showErrorHint(HintManagerImpl.java:427) at de.espend.idea.php.phpunit.intention.MethodExceptionIntentionAction.invoke(MethodExceptionIntentionAction.java:45) at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.invoke(PsiElementBaseIntentionAction.java:41) at com.intellij.codeInsight.intention.IntentionAction.generatePreview(IntentionAction.java:145) at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.generatePreview(IntentionActionWrapper.java:96) at...
When using the "Add constructor mocks" intention in a test, only the class names of the constructor parameters are imported (i.e. `use` statements added) if they weren't present before. When...
We use a custom DIC in our projects, and also provide an abstract PHPUnit TestCase that automatically mocks constructor dependencies for units under test. To access these auto mocks we...
PhpStorm 2021.3.2 Preview Build #PS-213.6777.13, built on January 14, 2022 OS: Windows 10 10.0 Plugin version: 6.2 ``` java.lang.Throwable: Indexing process should not rely on non-indexed file data. Indexing file...
- PHPUnit: Run Test - PHPUnit: Add mock method - PHPUnit: Expected exception - PHPUnit: Add constructor mocks ``` java.lang.IllegalStateException: [2 intention duplicates found for PHPUnit: Run Test: Registered: class...
stack trace: ``` com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:67) at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:821) at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:773) at com.intellij.psi.stubs.StubIndexImpl.getContainingIds(StubIndexImpl.java:501) at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:305) at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:100) at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:88) at com.jetbrains.php.PhpIndexImpl.getElements(PhpIndexImpl.java:574) at com.jetbrains.php.PhpIndexImpl.getByName(PhpIndexImpl.java:992) at...