![]() |
I would like to do some testing before deploying the app updates to the server, some CLI script that would run my controllers with the standard data and make sure there are no critical errors, so users do not see the "oops..." page quite so often
![]() I have never done unit testing and the content in Codeigniter 4 documentation seems to be written for those who know what it is pretty well and only need some hints on doing it the CI4 way. Could someone point me in the right direction? Easiest would be to find some simple tutorial about unit-testing controllers in CI, but in case there are none - how would you proceed to make learning PHP unit testing and writing tests the CI4 way as painless and short as possible?
==
Donatas G.
05-05-2022, 11:46 PM
(This post was last modified: 05-05-2022, 11:48 PM by captain-sensible. Edit Reason: added text )
well here's a birds eye view : https://www.guru99.com/unit-testing-guide.html
https://phpunit.de/getting-started/phpunit-9.html (05-05-2022, 11:46 PM)captain-sensible Wrote: well here's a birds eye view : https://www.guru99.com/unit-testing-guide.html Thanks!
==
Donatas G.
PHPUnit: What, Why, How? | Andy Carter
https://andy-carter.com/blog/phpunit-what-why-how
We are eventually going to have all the unit tests running in engine, so zero 'command line' config, and where you can select which files to run via a user friendly dropdown.
https://www.ignitedcms.com/playground/unit-testing
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
PHP Unit Testing - PHPUnit Tutorial - Full PHP 8 Tutorial - YouTube
https://www.youtube.com/watch?v=9-X_b_fxmRM
Guys i need help here on Php Spark serve
PS C:\xampp\htdocs\project> php spark serve CodeIgniter v4.1.9 Command Line Tool - Server Time: 2022-05-10 05:36:38 UTC-05:00 CodeIgniter development server started on http://localhost:8080 Press Control-C to stop. PS C:\xampp\htdocs\project> The problem here is that , it loads the server but it automatically cancel by itself and server will stop working
Great resources listed already! Also make sure you read the framework’s “testing quick start” docs if you haven’t already: https://github.com/codeigniter4/CodeIgni.../README.md
These are geared towards working in the framework itself but should help with some of the CodeIgniter-specific stuff.
Unit testing with PHPUnit: Introduction (1/10) - YouTube
https://www.youtube.com/watch?v=k9ak_rv9...bD47-_d8bJ |
Welcome Guest, Not a member yet? Register Sign In |