Fix warnings

This commit is contained in:
Laurent Destailleur
2024-06-01 15:30:43 +02:00
parent 8d16c2e996
commit 580a021c7d
2 changed files with 24 additions and 2 deletions

View File

@@ -122,6 +122,16 @@ class JsonLibTest extends CommonClassTest
$decoded = dol_json_decode($encoded, true);
$this->assertEquals($arraytotest, $decoded, 'test for dol_json_xxx');
$encoded = dol_json_encode(123);
$this->assertEquals(123, $encoded);
$decoded = dol_json_decode($encoded, true);
$this->assertEquals(123, $decoded, 'test for dol_json_xxx 123');
$encoded = dol_json_encode('abc');
$this->assertEquals('"abc"', $encoded);
$decoded = dol_json_decode($encoded, true);
$this->assertEquals('abc', $decoded, "test for dol_json_xxx 'abc'");
// Test with object
$now = gmmktime(12, 0, 0, 1, 1, 1970);
$objecttotest = new stdClass();