Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Pest
Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
I see thanks. To be honest, how I'm currently using it is that every time I refresh my database during testing I simply have a Populate button on the browser dashboard to call the function and refill the table. Once the whole system is running I probably wouldn't need it any more ,as the currency data would be permanent. Soon I'll start looking through all your other points in your comment above! Thanks
Even just the tests in your first link are very useful to see, such as: https://github.com/odan/slim4-skeleton/blob/master/tests/TestCase/Action/Customer/CustomerCreatorActionTest.php
Here's an example of a set of 25 tests I've written for a class with 4 methods (written using the Pest testing framework):
For your last edit - you can also add infection which will infect your code with other values, like if you expect a positive number, it will try and inject a negative number - and see what happens - does your code break everything or something. Also it will try to inject false where you might expect a true and many many other things, and yes you will get some weird results from infection, but its a good thing to look at, and atleast check the logs and see why the infection failed at a test.