fixed tests
This commit is contained in:
parent
9ec8d2ce57
commit
ee75385e7d
|
@ -80,7 +80,6 @@ class ConfigDataExporter {
|
||||||
* TODO
|
* TODO
|
||||||
*
|
*
|
||||||
* webauthn
|
* webauthn
|
||||||
* cron job runs
|
|
||||||
*/
|
*/
|
||||||
return json_encode($jsonData);
|
return json_encode($jsonData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,14 @@ class ConfigDataExporterTest extends TestCase {
|
||||||
'group' => array('default' => array('key' => 'value')),
|
'group' => array('default' => array('key' => 'value')),
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
|
$pdfTemplateData = array(
|
||||||
|
'user' => array('default' => array('key' => 'value')),
|
||||||
|
'group' => array('default' => array('key' => 'value')),
|
||||||
|
);
|
||||||
|
$selfServiceData = array(
|
||||||
|
'profile1' => array('key' => 'value'),
|
||||||
|
'profile2' => array('key' => 'value'),
|
||||||
|
);
|
||||||
$expectedJson = json_encode(array(
|
$expectedJson = json_encode(array(
|
||||||
'mainConfig' => $mainData,
|
'mainConfig' => $mainData,
|
||||||
'certificates' => 'certs',
|
'certificates' => 'certs',
|
||||||
|
@ -69,11 +77,14 @@ class ConfigDataExporterTest extends TestCase {
|
||||||
'accountProfiles' => $accountProfileData,
|
'accountProfiles' => $accountProfileData,
|
||||||
'accountProfileTemplates' => $accountProfileTemplateData,
|
'accountProfileTemplates' => $accountProfileTemplateData,
|
||||||
'pdfProfiles' => $pdfData,
|
'pdfProfiles' => $pdfData,
|
||||||
|
'pdfProfileTemplates' => $pdfTemplateData,
|
||||||
|
'selfServiceProfiles' => $selfServiceData,
|
||||||
));
|
));
|
||||||
|
|
||||||
$exporter = $this->getMockBuilder('\LAM\PERSISTENCE\ConfigDataExporter')
|
$exporter = $this->getMockBuilder('\LAM\PERSISTENCE\ConfigDataExporter')
|
||||||
->setMethods(array('_getMainConfigData', '_getCertificates', '_getServerProfiles',
|
->setMethods(array('_getMainConfigData', '_getCertificates', '_getServerProfiles',
|
||||||
'_getAccountProfiles', '_getAccountProfileTemplates', '_getPdfProfiles'))
|
'_getAccountProfiles', '_getAccountProfileTemplates', '_getPdfProfiles',
|
||||||
|
'_getPdfProfileTemplates', '_getSelfServiceProfiles'))
|
||||||
->getMock();
|
->getMock();
|
||||||
$exporter->method('_getMainConfigData')->willReturn($mainData);
|
$exporter->method('_getMainConfigData')->willReturn($mainData);
|
||||||
$exporter->method('_getCertificates')->willReturn('certs');
|
$exporter->method('_getCertificates')->willReturn('certs');
|
||||||
|
@ -81,6 +92,8 @@ class ConfigDataExporterTest extends TestCase {
|
||||||
$exporter->method('_getAccountProfiles')->willReturn($accountProfileData);
|
$exporter->method('_getAccountProfiles')->willReturn($accountProfileData);
|
||||||
$exporter->method('_getAccountProfileTemplates')->willReturn($accountProfileTemplateData);
|
$exporter->method('_getAccountProfileTemplates')->willReturn($accountProfileTemplateData);
|
||||||
$exporter->method('_getPdfProfiles')->willReturn($pdfData);
|
$exporter->method('_getPdfProfiles')->willReturn($pdfData);
|
||||||
|
$exporter->method('_getPdfProfileTemplates')->willReturn($pdfTemplateData);
|
||||||
|
$exporter->method('_getSelfServiceProfiles')->willReturn($selfServiceData);
|
||||||
|
|
||||||
$json = $exporter->exportAsJson();
|
$json = $exporter->exportAsJson();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue