Commit 3163db89 authored by Carsten  Rose's avatar Carsten Rose
Browse files

phpunit: fix problems

parent e712dce3
Pipeline #1202 passed with stage
in 1 minute and 31 seconds
......@@ -328,7 +328,7 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
}
/**
* @expectedException UserFormException
* @expectedException \qfq\UserFormException
*
* @throws CodeException
* @throws UserFormException
......@@ -369,13 +369,12 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
// id: 1, firstName: John, name: Doe
$formElement['sql1'] = $this->dbArray[DB_INDEX_DEFAULT]->sql('SELECT id, name, firstName FROM Person ORDER BY id LIMIT 2');
$formElement[SUBRECORD_PARAMETER_FORM] = 'Person';
$formElement[FE_SUBRECORD_OPTION] = '';
$result = $build->buildSubrecord($formElement, 'name:1', '', $json);
$this->assertEquals('Please save this record first.', $result);
$this->assertEquals('<table class="table table-hover qfq-subrecord-table" ><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->store->setStore(['id' => 1], STORE_RECORD, true);
$formElement[SUBRECORD_PARAMETER_FORM] = 'Person';
$formElement[FE_SUBRECORD_OPTION] = '';
$result = $build->buildSubrecord($formElement, 'name:1', '', $json);
$this->assertEquals('<table class="table table-hover qfq-subrecord-table" ><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);
......
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