Commit 71404bbc authored by Marc Egger's avatar Marc Egger
Browse files

debug gitlab CI

parent 771c6030
Pipeline #4006 failed with stages
in 3 minutes and 13 seconds
......@@ -80,12 +80,7 @@ class Config {
$cwdToConfigFile = $PhpUnitOverloadCwdToConfigFile === '' ? Path::cwdToProject(CONFIG_QFQ_JSON) : $PhpUnitOverloadCwdToConfigFile;
if (!file_exists($cwdToConfigFile)) {
HelperFile::file_put_contents(Path::cwdToProject(CONFIG_QFQ_JSON_EXAMPLE), json_encode(self::CONFIG_REQUIRED_TEMPLATE, JSON_PRETTY_PRINT));
Thrower::userFormException("Please create qfq config file '" . CONFIG_QFQ_JSON . "' in project directory. Example config file '" . CONFIG_QFQ_JSON_EXAMPLE . "' was created in project directory.", "Project directory: " . realpath(Path::cwdToProject())
// DEBUG
. print_r([Path::appToProject(), Path::cwdToProject(), Path::cwdToApp(), Path::cwdToLog(), "cwd" => getcwd(), Path::absoluteApp()],true)
// END DEBUG
);
Thrower::userFormException("Please create qfq config file '" . CONFIG_QFQ_JSON . "' in project directory. Example config file '" . CONFIG_QFQ_JSON_EXAMPLE . "' was created in project directory.", "Project directory: " . realpath(Path::cwdToProject()));
}
$config = HelperFile::json_decode(HelperFile::file_get_contents($cwdToConfigFile));
......
......@@ -6,7 +6,8 @@
namespace IMATHUZH\Qfq\Tests\Unit\Core;
use IMATHUZH\Qfq\Core\BuildFormPlain;
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Helper\Support;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Tests\Unit\Core\Database\AbstractDatabaseTest;
......@@ -406,6 +407,13 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
$formElement[SUBRECORD_PARAMETER_FORM] = 'Person';
$formElement[FE_SUBRECORD_OPTION] = '';
// DEBUG
throw new \UserFormException(json_encode(
[ERROR_MESSAGE_TO_USER => print_r([is_readable(Path::cwdToApp(Path::APP_TO_TYPO3_CONF, CONFIG_T3)), Path::cwdToApp(Path::APP_TO_TYPO3_CONF, CONFIG_T3)], true),
ERROR_MESSAGE_TO_DEVELOPER => FE_DND_TABLE . ' or ' . SUBRECORD_PARAMETER_FORM]),
ERROR_MISSING_TABLE_NAME);
// END DEBUG
$result = $build->buildSubrecord($formElement, 'name:1', '', $json);
$this->assertEquals('<table class="table table-hover qfq-subrecord-table qfq-color-grey-2" id="1-123" ><thead><tr><th>id</th><th>name</th><th>firstName</th></tr></thead><tbody ><tr class="record" ><td><span class="text-muted">1</span></td><td>Doe</td><td>John</td></tr><tr class="record" ><td><span class="text-muted">2</span></td><td>Smith</td><td>Jane</td></tr></tbody></table>', $result);
// $this->assertEquals('Please save this record first.', $result);
......
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