Welcome Guest, Not a member yet? Register   Sign In
Testing CRUD operations
#5

(This post was last modified: 10-30-2019, 08:40 PM by Poetawd.)

(10-30-2019, 08:16 PM)kilishan Wrote: There's a number of database testing methods. You might want to peruse the testing portion of the docs a bit more...

PHP Code:
$this->seeInDatabase('table', ['foo' => 'bar']); 

You should check both success and failure conditions, like when the wrong type of data was sent, etc. Test any edge cases you can think of, etc. However, just getting the basic success/fail conditions tested on those goes a long way when you're building your app out to make sure you don't break things.

Thank you Sir !

BTW, I miss your posts in your patreon page ... The last one was 2 months ago ! It would be awesome to see some CI testing there....

Specially on how to make all system tests PASS... haHaha

Also, I am playing around with project-tests. https://github.com/codeigniter4projects/project-tests
Reply


Messages In This Thread
Testing CRUD operations - by Poetawd - 10-30-2019, 06:35 PM
RE: Testing CRUD operations - by kilishan - 10-30-2019, 07:36 PM
RE: Testing CRUD operations - by Poetawd - 10-30-2019, 07:51 PM
RE: Testing CRUD operations - by kilishan - 10-30-2019, 08:16 PM
RE: Testing CRUD operations - by Poetawd - 10-30-2019, 08:35 PM
RE: Testing CRUD operations - by kilishan - 10-30-2019, 08:40 PM
RE: Testing CRUD operations - by Poetawd - 10-30-2019, 08:58 PM
RE: Testing CRUD operations - by kilishan - 10-31-2019, 06:27 AM
RE: Testing CRUD operations - by Poetawd - 10-31-2019, 01:58 PM
RE: Testing CRUD operations - by asadali - 01-14-2022, 03:59 AM
RE: Testing CRUD operations - by kenjis - 01-14-2022, 04:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB