35 $this->storage_handler_factory,
48 $this->denied_ending = $denied_ending;
51 public function check(
string $extension):
bool 53 if ($this->denied_ending === $extension) {
59 public function isValidExtension(
string $extension):
bool 61 return $this->denied_ending !== $extension;
64 public function isBlockedExtension(
string $extension):
bool 66 return $this->denied_ending === $extension;
69 public function prepareFileNameForConsumer(
string $filename_with_extension):
string 71 return $filename_with_extension;
78 $denied_ending =
'xml';
82 $expected_file_name =
'info.' . $denied_ending;
99 $this->expectException(FileNamePolicyException::class);
105 $denied_ending =
'xml';
109 $expected_file_name =
'info.pdf';
Class FileNamePolicyException.
ILIAS ResourceStorage Resource ResourceBuilder $resource_builder
Class ChatMainBarProvider .
Interface FileNamePolicy.
Class FileNamePolicyTest.
Class AbstractBaseResourceBuilderTest.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct()
Constructor setup ILIAS global object public.
getResourceBuilder(string $denied_ending)
mockResourceAndRevision(string $expected_file_name, string $expected_mime_type, int $expected_size, int $expected_version_number, int $expected_owner_id)
getFileNamePolicy(string $denied_ending)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...