A codeigniter unit tests example using only hooks.
A codeigniter unit tests example using only hooks.
1 Put in your project. You can:
-
Create a database "ci-phpunit" or modify the database specifications
-
Run in your browser the url 'your-project-url/migrate' for generate the 'posts' table in database
-
Run in your CLI 'cd your-project-directory'
'php vendor/phpunit/phpunit/composer/bin/phpunit' or 'php vendor/phpunit/phpunit/composer/bin/phpunit --testdox'