PHPUnit Enhancement

Compatible with: IntelliJ IDEA PhpStorm
Nov 07, 2017
8 162
GitHub | Donate

Fork of PHPUnit Autocomplete Assistant

PhpStorm plugin to provide smart autocomplete, code navigation and refactoring features for mocked class methods.

Feature list

  • method autocomplete for class, abstract class and trait mock objects;

    • type providers: getMock, getMockForAbstractClass, etc. will return mock object with methods of mocking class and PHPUnit_Framework_MockObject_MockObject;
    • supported PHPUnit methods:

      PHPUnit_Framework_MockObject_MockBuilder::setMethods

      PHPUnit_Framework_TestCase::getMock

      PHPUnit_Framework_TestCase::getMockClass

      PHPUnit_Framework_TestCase::getMockForAbstractClass

      PHPUnit_Framework_TestCase::getMockForTrait

      PHPUnit_Framework_MockObject_Builder_InvocationMocker::method

  • code navigation (go to declaration, find usages, etc.) and refactoring (rename methods);
  • highlighting of incorrect method usages;
  • Prophecy support.

Download plugin

Recent change notes

  • Handle deletion of PhpThrownExceptionsAnalyzer#getExceptionClasses in PhpStorm 2017.3 #28
see full changelog | Donate