Loading src/Element/OfficeHoursDatetime.php +1 −1 Original line number Diff line number Diff line Loading @@ -151,8 +151,8 @@ class OfficeHoursDatetime extends Datetime { return TRUE; } if ($element == -1) { // Value may be integer or text, depending on source. // Empty hours/minutes, but comment enabled. // Value may be integer or text, depending on source. return TRUE; } if (is_array($element)) { Loading tests/src/Unit/OfficeHoursDatetimeUnitTest.php +2 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ class OfficeHoursDatetimeUnitTest extends UnitTestCase { public function testDateTimeIsEmpty() { $this::assertTrue(OfficeHoursDatetime::isEmpty(NULL), 'Test Datetime NULL is empty.'); $this::assertNotTrue(OfficeHoursDatetime::isEmpty(-1), 'Test 24:00 is not empty.'); $this::assertTrue(OfficeHoursDatetime::isEmpty(-1), 'Test 24:00 is not empty.'); $this::assertTrue(OfficeHoursDatetime::isEmpty('-1'), 'Test 24:00 is not empty.'); $this::assertTrue(OfficeHoursDatetime::isEmpty(''), 'Test empty slot is empty.'); $this::assertTrue(OfficeHoursDatetime::isEmpty([ 'time' => '', Loading Loading
src/Element/OfficeHoursDatetime.php +1 −1 Original line number Diff line number Diff line Loading @@ -151,8 +151,8 @@ class OfficeHoursDatetime extends Datetime { return TRUE; } if ($element == -1) { // Value may be integer or text, depending on source. // Empty hours/minutes, but comment enabled. // Value may be integer or text, depending on source. return TRUE; } if (is_array($element)) { Loading
tests/src/Unit/OfficeHoursDatetimeUnitTest.php +2 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ class OfficeHoursDatetimeUnitTest extends UnitTestCase { public function testDateTimeIsEmpty() { $this::assertTrue(OfficeHoursDatetime::isEmpty(NULL), 'Test Datetime NULL is empty.'); $this::assertNotTrue(OfficeHoursDatetime::isEmpty(-1), 'Test 24:00 is not empty.'); $this::assertTrue(OfficeHoursDatetime::isEmpty(-1), 'Test 24:00 is not empty.'); $this::assertTrue(OfficeHoursDatetime::isEmpty('-1'), 'Test 24:00 is not empty.'); $this::assertTrue(OfficeHoursDatetime::isEmpty(''), 'Test empty slot is empty.'); $this::assertTrue(OfficeHoursDatetime::isEmpty([ 'time' => '', Loading