mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 05:58:46 +02:00
N°8981: prepare hub connector test cover
sdk test enhancement : add call itop api fix ci ci: fix broken tests ci: cover hub setup on compile and launch steps code style ci: fix ModuleDiscoveryTest redundant class + add logs to investigate ci setup issues ci: fix log during setup tests
This commit is contained in:
@@ -25,6 +25,7 @@ class JsonPage extends WebPage
|
||||
* This can be useful when feeding response to a third party lib that doesn't understand the structured format.
|
||||
*/
|
||||
protected $bOutputDataOnly = false;
|
||||
protected $bOutputHeaders = true;
|
||||
|
||||
/**
|
||||
* JsonPage constructor.
|
||||
@@ -82,6 +83,19 @@ class JsonPage extends WebPage
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see static::$bOutputHeaders
|
||||
* @param bool $bFlag
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetOutputHeaders(bool $bFlag)
|
||||
{
|
||||
$this->bOutputHeaders = $bFlag;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the headers
|
||||
*
|
||||
@@ -119,7 +133,10 @@ class JsonPage extends WebPage
|
||||
public function output()
|
||||
{
|
||||
$oKpi = new ExecutionKPI();
|
||||
$this->OutputHeaders();
|
||||
if ($this->bOutputHeaders) {
|
||||
$this->OutputHeaders();
|
||||
}
|
||||
|
||||
$sContent = $this->ComputeContent();
|
||||
$oKpi->ComputeAndReport(get_class($this).' output');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user