<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
*/
private $dice;
- protected function setUp()
+ protected function setUp() : void
{
parent::setUp();
self::assertInstanceOf(ConfigFileLoader::class, $configFileLoader);
$configCache = new Cache();
- $configCache->set('database', 'disable_pdo', true);
$configFileLoader->setupCache($configCache);
self::assertNotEmpty($configCache->getAll());
public function testDatabase()
{
+ // PDO needs to be disabled for PHP 7.2, see https://jira.mariadb.org/browse/MDEV-24121
+ if (version_compare(PHP_VERSION, '7.3') < 0) {
+ $configCache = $this->dice->create(Cache::class);
+ $configCache->set('database', 'disable_pdo', true);
+ }
+
/** @var Database $database */
$database = $this->dice->create(Database::class);
public function testAppMode()
{
+ // PDO needs to be disabled for PHP 7.2, see https://jira.mariadb.org/browse/MDEV-24121
+ if (version_compare(PHP_VERSION, '7.3') < 0) {
+ $configCache = $this->dice->create(Cache::class);
+ $configCache->set('database', 'disable_pdo', true);
+ }
+
/** @var App\Mode $mode */
$mode = $this->dice->create(App\Mode::class);