D
D
DarkByte20152018-02-21 10:08:18
Yii
DarkByte2015, 2018-02-21 10:08:18

PHPUnit Composer autoload?

I have a yii2 project. Yes, I know there by default codeception, I tried to figure it out - but for me it's TOO COMPLEX! I only need unit tests, and there is a lot of stuff there. In general, I sawed codeception and sawed phpunit. It basically works (a simple demo of assertTrue without dependencies is wound up), but when I try to use my classes from the project, everything collapses "class not found". I'm pretty sure it's a startup problem. For some reason it doesn't work with phpunit. How to be? Googled, tried to put autoload in composer.json, specify phpunit --bootstrap vendor/autoload.php as it is written in Google, but nothing worked. How can I start tests? I really need them right now!
PS php 5.6, phpunit 5, yii 2.0.14

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question