From 2b764e52b12b0239358a0bcff45a2e530a770c2c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Nov 2024 21:37:55 +0100 Subject: [PATCH] Add assertion on this test --- test/phpunit/AccountingAccountTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/phpunit/AccountingAccountTest.php b/test/phpunit/AccountingAccountTest.php index a7fb41157e31f..5ed9dd3615116 100644 --- a/test/phpunit/AccountingAccountTest.php +++ b/test/phpunit/AccountingAccountTest.php @@ -200,6 +200,9 @@ public function testGetCurrentPeriodOfFiscalYear() print __METHOD__." date_start = ".dol_print_date($result['date_start'], 'dayhour', 'gmt')."\n"; print __METHOD__." date_end = ".dol_print_date($result['date_end'], 'dayhour', 'gmt')."\n"; + $this->assertArrayHasKey('date_start', $result); + $this->assertArrayHasKey('date_end', $result); + $result = getCurrentPeriodOfFiscalYear($db, $conf, null, 'gmt'); var_dump($result); @@ -207,6 +210,9 @@ public function testGetCurrentPeriodOfFiscalYear() print __METHOD__." date_start = ".dol_print_date($result['date_start'], 'dayhour', 'gmt')."\n"; print __METHOD__." date_end = ".dol_print_date($result['date_end'], 'dayhour', 'gmt')."\n"; + $this->assertArrayHasKey('date_start', $result); + $this->assertArrayHasKey('date_end', $result); + return $result; } }