Welcome Guest, Not a member yet? Register   Sign In
Testing, specifically when having database dependant code
#7

(08-15-2019, 11:34 AM)kilishan Wrote:
(08-14-2019, 01:45 AM)tgix Wrote: With CI4 I try to do the same, but find the following line from the $tests structure in Config\Database.php:67 a bit strange:
PHP Code:
'DBPrefix' => 'db_' // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE. 
 
I have already nuked my DB twice by setting this to blank so I'm really missing something here ;-)

Sorry - that note was for internal tests of the framework. If you're not running those, and just running the ones for your app, then change the prefix to whatever you need it to be.

( I should probably change that comment Smile  )

An extra note that the tests are deleting the tables with this prefix after completion maybe in place (in CIDatabaseTestCase::tearDown()).
If DBPrefix is blank this will delete all tables.
Reply


Messages In This Thread
RE: Testing, specifically when having database dependant code - by tgix - 08-15-2019, 10:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB