I'm new to PHP and Codeception and the whole concept of unit testing. So far I've followed Codeception's quick start guide (http://codeception.com/quickstart) and read their documentation (http://codeception.com/docs/05-UnitTests).
I have managed to set up the testing environment, and
- Created the unit test file (
php codecept.phar generate:test unit ExampleTest) - Run the test command (
php codecept.phar run unit ExampleTest), which returns an error:
There was 1 error:
1) ExampleTest: Validation Test tests\unit\ExampleTest.php:testValidation [Error] Class 'User' not found #1 ExampleTest->testValidation #2 C:\laragon\www\kario\vendor\bin\codecept.phar:5
What I don't understand is how does the test file know which PHP file to run the test on?
My laragon project is named kario, and sits in C:\laragon\www\kario\resources\views\pages\orders while the test unit file is in C:\laragon\www\kario\vendor\bin\tests\unit.