0

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
  • 2
    It'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. Commented Oct 24, 2016 at 11:53

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.