mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-01 14:04:30 +02:00
Added some unit tests.
This commit is contained in:
parent
1c7155d4e7
commit
943d235b8b
9 changed files with 562 additions and 40 deletions
|
@ -30,6 +30,7 @@
|
|||
namespace App\Security\Annotations;
|
||||
|
||||
use Doctrine\Common\Annotations\Annotation;
|
||||
use \InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
|
@ -100,8 +101,9 @@ class ColumnSecurity
|
|||
return false;
|
||||
case 'datetime':
|
||||
$date = new \DateTime();
|
||||
|
||||
return $date->setTimestamp(0);
|
||||
default:
|
||||
throw new InvalidArgumentException('Unknown type! You have to specify a placeholder!');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue