Difference between #3 and #4 of
Configuring PhpStorm IDE for Yii 2

Revision #4 has been created by CeBe on Apr 5, 2018, 1:35:42 PM with the memo:

phpunit and codeception
« previous (#3) next (#5) »

Changes

Title unchanged

Configuring PhpStorm IDE for Yii 2

Category unchanged

Tips

Yii version unchanged

2.0

Tags unchanged

IDE,PhpStorm,IntelliJ IDEA

Content changed

[...]
- **Enable composer integration** to tell PHPStorm to separate vendor files from project files.

`composer.json` - *right click* - Composer - Init Composer ...


 
# PHPUnit and Codeception
 
 
PHPStorm has integrations for PHPUnit as well as Codeception, so you can run your tests directly from the IDE.
 
 
Settings for that can be found at *Run* - *Edit Configurations...*.
 
 
To add your Codeception tests, click the <kbd>+</kbd> button, select *Codeception*. Then enter the following details:
 
 
- Name: "Codeception tests" - or whatever you want to name it
 
- Test Scope: *Defined in the Configuration file*
 
- Use alternative configuration file: "codeception.yml"
 
- In case PHPStorm asks you to do it, configure a PHP Interpreter in PHPStorm settings
 
- Configure Codeception binary as `vendor/bin/codecept`
 
 
You can now run your tests directly from PHPStorm.
 
 
For PHPUnit the steps are similar but Yii application templates do not provide PHPUnit tests by default so the options depend on your setup.
14 0
6 followers
Viewed: 50 158 times
Version: 2.0
Category: Tips
Written by: CeBe
Last updated by: CeBe
Created on: Apr 5, 2018
Last updated: 5 years ago
Update Article

Revisions

View all history