Example #1
0
function processList($t, $uid_Process, $process_uid_library)
{
    $processes = ws_processList();
    $t->is(count($processes->processes) >= 0, true, 'ws_processList works fine');
    $foundProcess = false;
    if (is_array($processes->processes)) {
        foreach ($processes->processes as $key => $val) {
            if ($val->guid == $uid_Process) {
                $foundProcess = true;
            }
        }
    } else {
        if ($processes->processes->guid == $uid_Process) {
            $foundProcess = true;
        }
    }
    if ($foundProcess) {
        $t->is($foundProcess, true, 'Process for' . $uidName[1] . 'is present in this Workspace');
    } else {
        $res = ws_importProcessFromLibrary($process_uid_library, '', 3, PML_USER_ID, PML_USER_PASS);
        if ($res->status_code == 0) {
            $t->is($res->status_code, 0, 'Process imported from Library successfully');
            $t->diag('  processTitle ' . $res->processTitle);
            $t->diag('  category     ' . $res->category);
            $t->diag('  version      ' . $res->version);
        } else {
            throw new Exception($res->message . ".  Process '" . $uid_Process . "' ");
        }
    }
}
function processList($t, $uid_Process, $process_uid_library)
{
    $processes = ws_processList();
    $t->is(count($processes->processes) >= 0, true, 'ws_processList works fine');
    $foundProcess = false;
    if (is_array($processes->processes)) {
        foreach ($processes->processes as $key => $val) {
            if ($val->guid == $uid_Process) {
                $foundProcess = true;
            }
        }
    } else {
        if ($processes->processes->guid == $uid_Process) {
            $foundProcess = true;
        }
    }
    if ($foundProcess) {
        $t->is($foundProcess, true, 'Process for' . $uidName[1] . 'is present in this Workspace');
    }
}
Example #3
0
$t->diag('  operatingSystem    ' . $info->operatingSystem);
$t->diag('  webServer          ' . $info->webServer);
$t->diag('  serverName         ' . $info->serverName);
$t->diag('  serverIp           ' . $info->serverIp);
$t->diag('  phpVersion         ' . $info->phpVersion);
$t->diag('  databaseVersion    ' . $info->databaseVersion);
$t->diag('  databaseServerIp   ' . $info->databaseServerIp);
$t->diag('  databaseName       ' . $info->databaseName);
$t->diag('  availableDatabases ' . $info->availableDatabases);
$t->diag('  userBrowser        ' . $info->userBrowser);
$t->diag('  userIp             ' . $info->userIp);
$t->is(strlen($sessionId) > 30, true, 'getting a valid SessionId');
$t->is(strlen($sessionId) > 30, true, 'ws_open works fine');
$t->diag('Session Id: ' . $sessionId);
//checking the processList
$processes = ws_processList();
$t->is(count($processes->processes) >= 0, true, 'ws_processList works fine');
$foundProcess = false;
if (is_array($processes->processes)) {
    foreach ($processes->processes as $key => $val) {
        if ($val->guid == PROCESS_UID) {
            $foundProcess = true;
        }
    }
} else {
    if ($processes->processes->guid == PROCESS_UID) {
        $foundProcess = true;
    }
}
if ($foundProcess) {
    $t->is($foundProcess, true, 'Sequential Process is present in this Workspace');