Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Class 'UnitTestCase' not found

Hello,

I'm running phpunit with instructions from https://docs.phalconphp.com/en/latest/reference/unit-testing.html#sample-unit-test

and I'm getting Class 'UnitTestCase' not found error like in this question http://stackoverflow.com/questions/18859383/phalcon-unittesting

This in TestHelper.php doesn't help:

$loader->registerNamespaces([
    'Phalcon' => '../vendor/phalcon/incubator/Library/Phalcon/'
]);

It's like after composer install incubator lib is not detected but other classes from Phalcon works ok



262
Accepted
answer

Problem solved. Remember to run phpunit in tests folder. phpunit tests/ command doesn't work.