chore(tests): UT for LdapCheck service

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2024-04-13 08:19:41 +02:00
parent 43fe145189
commit fb68ff5c0d
7 changed files with 410 additions and 105 deletions

View File

@@ -93,13 +93,13 @@ final class CheckImportController extends SimpleControllerBase
$this->template->addTemplate('results', 'itemshow');
$this->template->assign('header', __('Results'));
$this->template->assign('results', $data);
$this->template->assign('results', $data->getResults());
return $this->returnJsonResponseData(
['template' => $this->template->render(), 'items' => $data['results']],
['template' => $this->template->render(), 'items' => $data->getResults()],
JsonMessage::JSON_SUCCESS,
__u('LDAP connection OK'),
[sprintf(__('Objects found: %d'), $data['count'])]
[sprintf(__('Objects found: %d'), $data->count())]
);
} catch (Exception $e) {
processException($e);