Improved code style of tests

This commit is contained in:
Jan Böhmer 2023-06-11 15:02:59 +02:00
parent 5629215ce4
commit 684334ba22
73 changed files with 196 additions and 38 deletions

View file

@ -29,6 +29,7 @@ use Symfony\Component\Filesystem\Filesystem;
/**
* This service converts the relative pathes for attachments saved in database (like %MEDIA%/img.jpg) to real pathes
* an vice versa.
* @see \App\Tests\Services\Attachments\AttachmentPathResolverTest
*/
class AttachmentPathResolver
{

View file

@ -31,6 +31,9 @@ use function strlen;
use Symfony\Component\Asset\Packages;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
/**
* @see \App\Tests\Services\Attachments\AttachmentURLGeneratorTest
*/
class AttachmentURLGenerator
{
protected string $public_path;

View file

@ -30,6 +30,7 @@ use Symfony\Contracts\Cache\CacheInterface;
/**
* This service is used to find builtin attachment ressources.
* @see \App\Tests\Services\Attachments\BuiltinAttachmentsFinderTest
*/
class BuiltinAttachmentsFinder
{
@ -57,7 +58,7 @@ class BuiltinAttachmentsFinder
foreach($finder as $file) {
$folder = $file->getRelativePath();
//Normalize path (replace \ with /)
$folder = str_replace('\\', '/', $folder);
$folder = str_replace('\\', '/', (string) $folder);
if(!isset($output[$folder])) {
$output[$folder] = [];

View file

@ -32,6 +32,7 @@ use Symfony\Contracts\Cache\ItemInterface;
* A service that helps to work with filetype filters (based on the format <input type=file> accept uses).
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers for
* more details.
* @see \App\Tests\Services\Attachments\FileTypeFilterToolsTest
*/
class FileTypeFilterTools
{