Commit 5d0e91c8 authored by Marc Egger's avatar Marc Egger
Browse files

reenable phpunit in makefile

parent 72543205
Pipeline #3989 failed with stages
in 2 minutes and 11 seconds
......@@ -122,9 +122,7 @@ phpunit:
cp -v typo3conf/ext/qfq/Tests/phpunit_qfq.json typo3conf/ext/qfq.json; sed -i "s/#PHPUNIT_PASSWORD#/$(PHPUNIT_MYSQL_PASSWORD)/" typo3conf/ext/qfq.json
# run phpunit
# TEMPORARILY DISABLED !
# cd typo3conf/ext/qfq/; pwd; vendor/bin/phpunit --configuration phpunit.xml
cd typo3conf/ext/qfq/; pwd; vendor/bin/phpunit --configuration phpunit.xml
phpunit_snapshot: snapshot phpunit
......
......@@ -138,20 +138,10 @@ class QuickFormQuery {
// PHPExcel
set_include_path(get_include_path() . PATH_SEPARATOR . '../../Resources/Private/Classes/');
if (!isset($t3data[T3DATA_BODYTEXT])) {
// TODO: ?CR: when does this happen? why no exception thrown?
$t3data[T3DATA_BODYTEXT] = '';
}
if (!isset($t3data[T3DATA_UID])) {
// TODO: ?CR: when does this happen? why no exception thrown?
$t3data[T3DATA_UID] = 0;
}
if (!isset($t3data[T3DATA_HEADER])) {
// TODO: ?CR: when does this happen? why no exception thrown?
$t3data[T3DATA_HEADER] = '';
}
// set dummy values if QuickFormQuery is not called by Typo3
$t3data[T3DATA_BODYTEXT] = $t3data[T3DATA_BODYTEXT] ?? '';
$t3data[T3DATA_UID] = $t3data[T3DATA_UID] ?? 0;
$t3data[T3DATA_HEADER] = $t3data[T3DATA_HEADER] ?? '';
// Read report file, if file keyword exists in bodytext
$reportPathFileNameFull = ReportAsFile::parseFileKeyword($t3data[T3DATA_BODYTEXT]);
......@@ -209,9 +199,8 @@ class QuickFormQuery {
$dbIndex = ($dbIndex == '') ? DB_INDEX_DEFAULT : $dbIndex;
$this->store->setVar(TOKEN_DB_INDEX, $dbIndex, STORE_TYPO3);
// Create report file if file keyword not found
// TODO: ?CR: uid could be 0. When does this happen?
if (strtolower($this->store->getVar(SYSTEM_REPORT_AS_FILE_AUTO_EXPORT, STORE_SYSTEM)) === 'yes' && $reportPathFileNameFull === null && $t3data[T3DATA_UID] !== 0) {
// Create report file if file keyword not found (and auto export is enabled in qfq settings)
if ($reportPathFileNameFull === null && $t3data[T3DATA_UID] !== 0 && strtolower($this->store->getVar(SYSTEM_REPORT_AS_FILE_AUTO_EXPORT, STORE_SYSTEM)) === 'yes') {
$reportPathFileNameFull = ReportAsFile::create_file_from_ttContent($t3data[T3DATA_UID], $this->dbArray[$this->dbIndexData]);
}
......
......@@ -62,8 +62,8 @@ class Config {
}
/**
* Read qfq.json (merge with Typo3-qfq config if exists)
* Deprecated config file typo3conf/config.qfq.php is translated to JSON in PATH:cwdToProject(..)
* Read qfq.json (merge with Typo3-qfq config if exists).
* Note: Deprecated config file typo3conf/config.qfq.php is translated to JSON in PATH:cwdToProject(..)
*
* @param string $PhpUnitOverloadCwdToConfigFile
* @throws \CodeException
......@@ -92,9 +92,9 @@ class Config {
}
if ($PhpUnitOverloadCwdToConfigFile === '') {
$configT3qfq = self::readTypo3QfqConfig();
// Settings in qfq.json overwrite T3 settings
$configT3qfq = self::readTypo3QfqConfig();
$config = array_merge($configT3qfq, $config);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment