mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
fixed wrong JSON-Mapping for GUIOptions
This commit is contained in:
@@ -38,7 +38,7 @@ class GUIGueltigkeit implements JsonSerializable {
|
||||
{
|
||||
throw new \Exception('missing guioptions');
|
||||
}
|
||||
$this->getJSONData($this->guioptions, $decodedData, 'guioptions');
|
||||
$this->guioptions = $decodedData;
|
||||
}
|
||||
|
||||
private function mapData(&$decoded)
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
* Authors: Werner Masik <werner.masik@gefi.at>
|
||||
*
|
||||
*/
|
||||
require_once('../../config/system.config.inc.php');
|
||||
require_once('../../include/appdaten.class.php');
|
||||
require_once('../../include/benutzer.class.php');
|
||||
require_once( __DIR__.'/../../config/system.config.inc.php');
|
||||
require_once( __DIR__.'/../../include/appdaten.class.php');
|
||||
require_once( __DIR__.'/../../include/benutzer.class.php');
|
||||
|
||||
class AppdatenTest extends PHPUnit_Framework_TestCase
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class AppdatenTest extends TestCase
|
||||
{
|
||||
protected $benutzer;
|
||||
protected $uid = 'unittest';
|
||||
|
||||
@@ -18,12 +18,13 @@
|
||||
* Authors: Werner Masik <werner@gefi.at>,
|
||||
*/
|
||||
|
||||
|
||||
|
||||
require_once(__DIR__.'/../../config/vilesci.config.inc.php');
|
||||
require_once(__DIR__.'/../../include/functions.inc.php');
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
|
||||
class FunctionsTest extends TestCase
|
||||
{
|
||||
|
||||
|
||||
@@ -19,17 +19,17 @@ class FormDataTest extends TestCase
|
||||
$decoded = json_decode($jsondata, true);
|
||||
$formDataMapper->mapJSON($decoded);
|
||||
// Dienstverhaeltnis
|
||||
$dataDV = $formDataMapper->getData();
|
||||
$dataDV = $formDataMapper->getData();
|
||||
$this->assertNotEmpty($dataDV);
|
||||
$this->assertNotEmpty($dataDV['unternehmen']);
|
||||
$this->assertEquals('gst', $dataDV['unternehmen']);
|
||||
$this->assertNull($dataDV['dienstverhaeltnisid']);
|
||||
$this->assertNotEmpty($dataDV['vertragsart_kurzbz']);
|
||||
$this->assertEquals('echterDV', $dataDV['vertragsart_kurzbz']);
|
||||
$this->assertEquals('echterdv', $dataDV['vertragsart_kurzbz']);
|
||||
$this->assertNotEmpty($dataDV['gueltigkeit']);
|
||||
$this->assertNotEmpty($dataDV['gueltigkeit']['guioptions']);
|
||||
$this->assertNotEmpty($dataDV['gueltigkeit']['data']);
|
||||
$this->assertNotEmpty($dataDV['gueltigkeit']['data']['gueltig_ab']);
|
||||
$this->assertNotEmpty($dataDV['gueltigkeit']->getGuioptions());
|
||||
$this->assertNotEmpty($dataDV['gueltigkeit']->getData());
|
||||
$this->assertNotEmpty($dataDV['gueltigkeit']->getData()['gueltig_ab']);
|
||||
// Vertragsbestandteile
|
||||
$vbs = $formDataMapper->getVbs();
|
||||
$this->assertNotEmpty($vbs);
|
||||
|
||||
Reference in New Issue
Block a user