

With the covered class in place, PhpStorm will pick out the relevant class methods to annotate with suggest auto-completion for them. In PhpStorm 2018.1, we’ve significantly enhanced the support for the PHPUnit soon as you provide the for a test class, name completion will become available: Simply invoke Run inspection by name and select the inspection: PhpStorm will generate the missing elements in their respective locations, taking your PSR-0/PSR-4 structure into account.Īs with other inspections, the Missing target element for PHPUnit test inspection can be used for applying changes in bulk. To fix this, simply position the caret on an element, invoke the quick-fix by pressing Alt-Enter, and execute the required command: The inspection will detect if a class or a method being tested is not yet created. To handle such situations, PhpStorm 2018.1 introduces the Missing target element for PHPUnit test inspection and the corresponding quick-fix. With TDD becoming more and more popular, it may happen that the test is already in place, but the class being tested does not exist yet. In PhpStorm, creating a test from a class is as simple as pressing Ctrl+Shift+T ( Cmd+Shift+T on macOS). Let’s take a closer look at the new features.Ĭreating a class and class methods from a test

You can now create target classes from tests, annotate your tests easily, and run the tests using the code editor gutter icons. PhpStorm 2018.1.1 build 181.4445.72 is now available! You can download it here or in JetBrains Toolbox App. If you have installed the previous PhpStorm 2018.1 or PhpStorm 2018.1.1 EAP build (181.4445.32), please invoke the Check for updates action to receive the latest update.PhpStorm 2018.1 brings several improvements to streamline and simplify your work with PHPUnit tests.


This build delivers new features, bug fixes and improvements for PHP and the Web, and takes on the latest improvements in IntelliJ Platform. If you don’t receive the automatic update, please check your settings under Preferences | Appearance & Behavior | System Settings | Updates and make sure that Automatically check for updates is enabled. File-level suppression to PHP inspections You may also invoke the Check for updates action. PhpStorm provides a lot of inspections to catch all sort of errors in your code, but it may occur that some particular code shouldn’t follow the standards set for the whole project. In previous PhpStorm versions, you were able to suppress a warning for a particular statement or declaration. PhpStorm 2018.1.1 brings the ability to suppress an inspection for the whole file: just add */ right after the first opening PHP tag or press ALT+Enter on the inspection warning and select Suppress for file in the submenu.
