Definition at line 33 of file UploadHandlerTest.php.
◆ testConstruct()
ILIAS\LegalDocuments\test\FileUpload\UploadHandlerTest::testConstruct |
( |
| ) |
|
Definition at line 37 of file UploadHandlerTest.php.
39 $this->assertInstanceOf(UploadHandler::class,
new UploadHandler($this->fail(...), $this->fail(...), $this->fail(...)));
◆ testGetFileIdentifierParameterName()
ILIAS\LegalDocuments\test\FileUpload\UploadHandlerTest::testGetFileIdentifierParameterName |
( |
| ) |
|
Definition at line 42 of file UploadHandlerTest.php.
44 $instance =
new UploadHandler($this->fail(...), $this->fail(...), $this->fail(...));
45 $this->assertSame(UploadHandlerInterface::DEFAULT_FILE_ID_PARAMETER, $instance->getFileIdentifierParameterName());
◆ testInfoResultWithoutResult()
ILIAS\LegalDocuments\test\FileUpload\UploadHandlerTest::testInfoResultWithoutResult |
( |
| ) |
|
Definition at line 81 of file UploadHandlerTest.php.
References null.
83 $content = fn() =>
new Error(
'Nothing uploaded yet.');
85 $instance =
new UploadHandler($this->fail(...), $content, $this->fail(...));
86 $this->assertSame(
null, $instance->getInfoResult(
'foo'));
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testInfoResultWithResult()
ILIAS\LegalDocuments\test\FileUpload\UploadHandlerTest::testInfoResultWithResult |
( |
| ) |
|
Definition at line 65 of file UploadHandlerTest.php.
67 $value =
'Lorem ipsum';
68 $document_content = $this->mockTree(DocumentContent::class, [
72 $content = fn() =>
new Ok($document_content);
73 $instance =
new UploadHandler($this->fail(...), $content, fn(
string $s) =>
'Translated ' . $s);
74 $info = $instance->getInfoResult(
'foo');
75 $this->assertSame(strlen($value), $info->getSize());
76 $this->assertSame(
'html', $info->getMimeType());
77 $this->assertSame(
'Translated updated_document', $info->getName());
78 $this->assertSame(
'foo', $info->getFileIdentifier());
◆ testLinks()
ILIAS\LegalDocuments\test\FileUpload\UploadHandlerTest::testLinks |
( |
| ) |
|
Definition at line 48 of file UploadHandlerTest.php.
50 $instance =
new UploadHandler(
51 static fn(
string $to):
string =>
'Will link to: ' . $to,
55 $this->assertGetter($instance, [
56 'getUploadURL' =>
'Will link to: upload',
57 'getFileRemovalURL' =>
'Will link to: rm',
58 'getExistingFileInfoURL' =>
'Will link to: info',
59 'supportsChunkedUploads' =>
false,
61 $this->assertSame([], $instance->getInfoForExistingFiles([]));
62 $this->assertSame([], $instance->getInfoForExistingFiles([
'foo']));
The documentation for this class was generated from the following file: