public function testGetPrimaryDocumentTypes() { $this->assertEquals(3, count(DocumentTypeProvider::getPrimaryDocumentTypes())); }
/** * Validation constraints for fields * @return array */ public function getValidationConstraints() { return new Assert\Collection(['type' => new Assert\Required([new Assert\NotBlank(), new Assert\Choice(['choices' => DocumentTypeProvider::getPrimaryDocumentTypes()])]), 'file' => new Assert\Collection(['name' => new Assert\Required([new Assert\NotBlank()]), 'content' => new Assert\Required([new Assert\NotBlank()]), 'digest' => new Assert\Required([new Assert\NotBlank()])])]); }