mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-21 11:24:40 +02:00
Added some tests for important entity methods.
This commit is contained in:
parent
0663a00df8
commit
89258bc102
18 changed files with 480 additions and 160 deletions
|
@ -116,7 +116,6 @@ class PartLot extends DBElement
|
|||
* Check if the current part lot is expired.
|
||||
* This is the case, if the expiration date is greater the the current date.
|
||||
* @return bool|null True, if the part lot is expired. Returns null, if no expiration date was set.
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function isExpired(): ?bool
|
||||
{
|
||||
|
@ -125,7 +124,7 @@ class PartLot extends DBElement
|
|||
}
|
||||
|
||||
//Check if the expiration date is bigger then current time
|
||||
return $this->expiration_date < new \DateTime();
|
||||
return $this->expiration_date < new \DateTime('now');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue