Add new file for StoredObjectType tests and update class definitions

This commit adds a new file, StoredObjectTypeTest.php, to ChillDocStoreBundle Tests. It contains unit tests for the StoredObjectType class. Changes are also made in StoredObjectNormalizer and StoredObjectDataMapper classes, making JWTDavTokenProviderInterface and UrlGeneratorInterface as readonly in StoredObjectNormalizer and removing unnecessary EntityManagerInterface and debug commands on StoredObjectDataMapper. These changes improve test coverage and optimize the code for better performance.
This commit is contained in:
2024-05-28 12:08:02 +02:00
parent 775535e683
commit 111a21fcec
3 changed files with 110 additions and 12 deletions

View File

@@ -24,15 +24,15 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
*
* Normalizes a StoredObject entity to an array of data.
*/
class StoredObjectNormalizer implements NormalizerInterface, NormalizerAwareInterface
final class StoredObjectNormalizer implements NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
public const ADD_DAV_SEE_LINK_CONTEXT = 'dav-see-link-context';
public const ADD_DAV_EDIT_LINK_CONTEXT = 'dav-edit-link-context';
public function __construct(
private JWTDavTokenProviderInterface $JWTDavTokenProvider,
private UrlGeneratorInterface $urlGenerator
private readonly JWTDavTokenProviderInterface $JWTDavTokenProvider,
private readonly UrlGeneratorInterface $urlGenerator
) {
}