I have a project on Cakephp 2.9.7. When I run test on my local machine I do not get any errors. But, when I try to run ./Console/cake test app Controller/AlarmsController
or test any other controller in my docker image, which actually has the same PHPUnit version and Cakephp version, I get an error MissingControllerException: Controller class AlarmsControllerController could not be found.
So, the word Controller
in the controller name is being used twice. The problem happens in https://github.com/cakephp/cakephp/blob/2.next/lib/Cake/TestSuite/ControllerTestCase.php#L339 this function. So the error trace looks the following way:
/project/lib/Cake/TestSuite/ControllerTestCase.php:347
/project/lib/Cake/TestSuite/ControllerTestCase.php:362
So the error causes the call of getMock
function(https://github.com/cakephp/cakephp/blob/2.next/lib/Cake/TestSuite/ControllerTestCase.php#L362). But I cannot undestand what happens there, and why it works on my local machine with equal conditions(PHPUnit, Cakephp version, the same project), but in the docker container I an get error.