$orig_sql = $sql;
- if (self::$config->get('system', 'db_callstack')) {
+ if (self::$config->get('system', 'db_callstack') !== null) {
$sql = "/*".System::callstack()." */ ".$sql;
}
namespace Friendica\Test;
+use Friendica\Core\Config;
use Friendica\Database\DBA;
+use Friendica\Factory;
+use Friendica\Util\BasePath;
use PHPUnit\DbUnit\DataSet\YamlDataSet;
use PHPUnit\DbUnit\TestCaseTrait;
use PHPUnit_Extensions_Database_DB_IDatabaseConnection;
$this->markTestSkipped('Please set the MYSQL_* environment variables to your test database credentials.');
}
+ $basedir = BasePath::create(dirname(__DIR__));
+ $configLoader = new Config\ConfigCacheLoader($basedir);
+ $config = Factory\ConfigFactory::createCache($configLoader);
+
DBA::connect(
- __DIR__,
+ $config,
getenv('MYSQL_HOST'),
getenv('MYSQL_USERNAME'),
getenv('MYSQL_PASSWORD'),