There was pretty simple way to run unit testing in cakephp2 from browser.But how to run such tests in cakephp3 ? I read cake documentation and nothing found easily ? thanks in advance..
1
-
2It's in the docs. Reading the migration guide would help to understand differences between Cake 2 and 3. book.cakephp.org/3.0/en/appendices/3-0-migration-guide.html The webrunner (webroot/test.php) has been removed. CLI adoption has greatly increased since the initial release of 2.x. Additionaly, CLI runners offer superior integration with IDE’s and other automated tooling.floriank– floriank2016-10-24 11:53:22 +00:00Commented Oct 24, 2016 at 11:53
Add a comment
|
1 Answer
In cakephp3 i don't think there is a way to run unit testing from browser.But no worries, you can do it from command prompt.Suppose you have any function to be tested within articles model then, In command prompt, go to your project directory and just run:
phpunit tests/TestCase/Model/Table/ArticlesTableTest
and for functions of controller just run:
phpunit tests/TestCase/Controller/ArticlesControllerTest