PerfdataTest: Update case which explicitly checks thresholds for null

It's not important whether null or not, as long as it properly detects
that no threshold is set. Further tests specifically for ThresholdRange
should accommodate this case by verifying we don't detect any WARNING.

refs #1298
This commit is contained in:
Johannes Meyer 2018-05-03 16:07:30 +02:00
parent 259bafea35
commit 273b0f2f94
1 changed files with 4 additions and 4 deletions

View File

@ -189,12 +189,12 @@ class PerfdataTest extends BaseTestCase
/**
* @depends testWhetherFromStringParsesAGivenStringCorrectly
*/
public function testWhetherMissingValuesAreReturnedAsNull()
public function testWhetherMissingValuesAreProperlyHandled()
{
$perfdata = Perfdata::fromString('test=1;;3;5');
$this->assertNull(
$perfdata->getWarningThreshold(),
'Perfdata objects do not return null for missing warning tresholds'
$this->assertEmpty(
(string) $perfdata->getWarningThreshold(),
'Perfdata objects do not correctly identify omitted warning tresholds'
);
$this->assertNull(
$perfdata->getMaximumValue(),