sforkowany z mirror/friendica
Merge pull request #5552 from MrPetovan/bug/5405-prevent-database-erasure-during-test
Skip DB tests if MYSQL_* environment variables are missing2022.09-rc
commit
df0c3c0562
|
@ -32,6 +32,10 @@ abstract class DatabaseTest extends TestCase
|
|||
*/
|
||||
protected function getConnection()
|
||||
{
|
||||
if (!getenv('MYSQL_DATABASE')) {
|
||||
$this->markTestSkipped('Please set the MYSQL_* environment variables to your test database credentials.');
|
||||
}
|
||||
|
||||
if (!DBA::connected()) {
|
||||
$this->markTestSkipped('Could not connect to the database.');
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue