mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
test: update test suite
This commit is contained in:
@@ -84,7 +84,7 @@ class Domain
|
||||
* @var Collection<int, DomainEntity>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: DomainEntity::class, mappedBy: 'domain', cascade: ['persist'], orphanRemoval: true)]
|
||||
#[Groups(['domain:item'])]
|
||||
#[Groups(['domain:item', 'watchlist:item'])]
|
||||
#[SerializedName('entities')]
|
||||
private Collection $domainEntities;
|
||||
|
||||
@@ -106,7 +106,7 @@ class Domain
|
||||
joinColumns: [new ORM\JoinColumn(name: 'domain_ldh_name', referencedColumnName: 'ldh_name')],
|
||||
inverseJoinColumns: [new ORM\JoinColumn(name: 'nameserver_ldh_name', referencedColumnName: 'ldh_name')]
|
||||
)]
|
||||
#[Groups(['domain:item'])]
|
||||
#[Groups(['domain:item', 'watchlist:item'])]
|
||||
private Collection $nameservers;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_IMMUTABLE)]
|
||||
|
||||
@@ -48,11 +48,11 @@ class Entity
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Tld::class, inversedBy: 'entities')]
|
||||
#[ORM\JoinColumn(referencedColumnName: 'tld', nullable: false)]
|
||||
#[Groups(['entity:list', 'entity:item', 'domain:item'])]
|
||||
#[Groups(['entity:list', 'entity:item', 'domain:item', 'watchlist:item'])]
|
||||
private ?Tld $tld = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
#[Groups(['entity:list', 'entity:item', 'domain:item'])]
|
||||
#[Groups(['entity:list', 'entity:item', 'domain:item', 'watchlist:item'])]
|
||||
private ?string $handle = null;
|
||||
|
||||
/**
|
||||
@@ -85,11 +85,11 @@ class Entity
|
||||
'items' => ['type' => 'array'],
|
||||
]
|
||||
)]
|
||||
#[Groups(['entity:item', 'domain:item'])]
|
||||
#[Groups(['entity:item', 'domain:item', 'watchlist:item'])]
|
||||
private array $jCard = [];
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
#[Groups(['entity:item', 'domain:item'])]
|
||||
#[Groups(['entity:item', 'domain:item', 'watchlist:item'])]
|
||||
private ?array $remarks = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'entities')]
|
||||
|
||||
@@ -52,7 +52,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
normalizationContext: [
|
||||
'groups' => [
|
||||
'watchlist:item',
|
||||
'domain:item',
|
||||
'domain:list',
|
||||
'event:list',
|
||||
'domain-entity:entity',
|
||||
'nameserver-entity:nameserver',
|
||||
@@ -90,7 +90,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
processor: WatchListUpdateProcessor::class,
|
||||
),
|
||||
new Put(
|
||||
normalizationContext: ['groups' => 'watchlist:item'],
|
||||
normalizationContext: ['groups' => 'watchlist:list'],
|
||||
denormalizationContext: ['groups' => ['watchlist:update']],
|
||||
security: 'object.user == user',
|
||||
processor: WatchListUpdateProcessor::class,
|
||||
|
||||
Reference in New Issue
Block a user