ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
AbstractBaseTest.php
Go to the documentation of this file.
1
<?php
2
3
namespace
ILIAS\ResourceStorage
;
4
5
require_once(
'DummyIDGenerator.php'
);
6
7
use
PHPUnit\Framework\TestCase
;
8
use
ILIAS\ResourceStorage\Identification\IdentificationGenerator
;
9
use
ILIAS\FileUpload\DTO\UploadResult
;
10
use
ILIAS\FileUpload\Collection\EntryLockingStringMap
;
11
use
ILIAS\FileUpload\DTO\ProcessingStatus
;
12
use
ILIAS\Filesystem\Stream\FileStream
;
13
use
ILIAS\Filesystem\Stream\Streams
;
14
use
ILIAS\ResourceStorage\Identification\ResourceIdentification
;
15
use
ILIAS\ResourceStorage\Revision\Revision
;
16
use
ILIAS\ResourceStorage\Revision\FileRevision
;
17
22
abstract
class
AbstractBaseTest
extends
TestCase
23
{
27
protected
$id_generator
;
31
protected
$db_mock
;
32
36
protected
function
setUp
() : void
37
{
38
parent::setUp();
39
$this->id_generator =
new
DummyIDGenerator
();
40
$this->db_mock = $this->getMockBuilder(\ilDBInterface::class)->getMock();
41
}
42
46
protected
function
getDummyUploadResult
(
string
$file_name,
string
$mime_type,
int
$size
) :
UploadResult
47
{
48
return
new
UploadResult
(
49
$file_name,
50
$size,
51
$mime_type,
52
new
EntryLockingStringMap
(),
53
new
ProcessingStatus
(
ProcessingStatus::OK
,
'No processors were registered.'
),
54
'dummy/path'
55
);
56
}
57
58
public
function
getDummyStream
() :
FileStream
59
{
60
return
Streams::ofString
(
'dummy_content'
);
61
}
62
63
protected
function
getDummyFileRevision
(
ResourceIdentification
$id) :
Revision
64
{
65
return
new
FileRevision
($id);
66
}
67
68
}
69
ILIAS\FileUpload\DTO\ProcessingStatus
Class ProcessingStatus.
Definition:
ProcessingStatus.php:36
$size
$size
Definition:
RandomTest.php:84
ILIAS\ResourceStorage\AbstractBaseTest
Class ResourceBuilderTest.
Definition:
AbstractBaseTest.php:22
ILIAS\ResourceStorage\AbstractBaseTest\$db_mock
$db_mock
Definition:
AbstractBaseTest.php:31
IdentificationGenerator
ILIAS\FileUpload\Collection\EntryLockingStringMap
Class EntryLockingStringMap.
Definition:
EntryLockingStringMap.php:21
ILIAS\ResourceStorage\AbstractBaseTest\$id_generator
$id_generator
Definition:
AbstractBaseTest.php:27
ResourceIdentification
ILIAS\ResourceStorage\Revision\FileRevision
Class FileRevision.
Definition:
FileRevision.php:13
Revision
ProcessingStatus
ILIAS\ResourceStorage
ILIAS\ResourceStorage\Identification\ResourceIdentification
Interface Identification.
Definition:
ResourceIdentification.php:14
ILIAS\ResourceStorage\AbstractBaseTest\getDummyStream
getDummyStream()
Definition:
AbstractBaseTest.php:58
ILIAS\Filesystem\Stream\Streams\ofString
static ofString($string)
Creates a new stream with an initial value.
Definition:
Streams.php:25
ILIAS\FileUpload\DTO\UploadResult
Class UploadResult.
Definition:
UploadResult.php:20
ILIAS\ResourceStorage\AbstractBaseTest\getDummyFileRevision
getDummyFileRevision(ResourceIdentification $id)
Definition:
AbstractBaseTest.php:63
EntryLockingStringMap
ILIAS\ResourceStorage\AbstractBaseTest\setUp
setUp()
Definition:
AbstractBaseTest.php:36
Streams
Exercise XML Parser which completes/updates a given file by an xml string.
ILIAS\ResourceStorage\AbstractBaseTest\getDummyUploadResult
getDummyUploadResult(string $file_name, string $mime_type, int $size)
Definition:
AbstractBaseTest.php:46
FileStream
ILIAS\ResourceStorage\Revision\Revision
Class FileRevision.
Definition:
Revision.php:12
ILIAS\ResourceStorage\DummyIDGenerator
Definition:
DummyIDGenerator.php:8
FileRevision
UploadResult
ILIAS\Filesystem\Stream\FileStream
Interface FileStream The base interface for all filesystem streams.
Definition:
FileStream.php:17
TestCase
ILIAS\FileUpload\DTO\ProcessingStatus\OK
const OK
Upload is ok.
Definition:
ProcessingStatus.php:42
tests
ResourceStorage
AbstractBaseTest.php
Generated on Wed Apr 2 2025 21:01:45 for ILIAS by
1.8.13 (using
Doxyfile
)