Add tests for lock acquisition functionality (#865)

This commit is contained in:
Lenaick
2026-03-31 17:01:22 +02:00
committed by GitHub
parent a6295f1b14
commit 3cdadf3c6e
3 changed files with 197 additions and 2 deletions

View File

@@ -668,7 +668,7 @@ abstract class ItopTestCase extends KernelTestCase
}
curl_setopt($ch, CURLOPT_URL, $sUrl);
curl_setopt($ch, CURLOPT_POST, 1);// set post data to true
curl_setopt($ch, CURLOPT_POST, $aCurlOptions[CURLOPT_POST] ?? 1);// set post data to true
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Force disable of certificate check as most of dev / test env have a self-signed certificate
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
@@ -676,7 +676,7 @@ abstract class ItopTestCase extends KernelTestCase
curl_setopt_array($ch, $aCurlOptions);
if ($this->IsArrayOfArray($aPostFields)) {
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($aPostFields));
} else {
} elseif (!empty($aPostFields)) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $aPostFields);
}