I have a project that is written in PHP with IntelliJ. I need to create a new IntelliJ project that contains only tests for the PHP application. I can't use classes from the application in the tests project. How can I add other project as a dependency for my project that contains the tests?
I have tried using IntelliJ module settings but I don't see the dependencies tab.
I'm not sure if it works exactly like that in IntelliJ, but in PhpStorm 2016 you can do as follows:
Open Project view (View -> Tool Windows -> Project) and locate External libraries at the bottom:
Press F4 or right click -> Configure PHP Include Paths. You should see this window:
Press the + icon at the bottom of the window and locate the directory with the classes that you want to test. IntelliJ should add them as a library, which means all autocompletion features will include the classes, but you will be warned when you try to edit these files.