mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 01:34:34 +02:00
Use DatetimeImmutable instead of DateTime wherever possible
This commit is contained in:
parent
eebc373734
commit
235d572f8c
39 changed files with 222 additions and 112 deletions
|
@ -95,7 +95,7 @@ class PartTest extends TestCase
|
|||
$part->addPartLot(
|
||||
(new PartLot())
|
||||
->setAmount(6)
|
||||
->setExpirationDate($datetime->setTimestamp(strtotime('now -1 hour')))
|
||||
->setExpirationDate(new \DateTimeImmutable('-1 hour'))
|
||||
);
|
||||
|
||||
$this->assertEqualsWithDelta(13.0, $part->getAmountSum(), PHP_FLOAT_EPSILON);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue