22 require_once(
'AbstractTestBase.php');
24 require_once(
'DummyIDGenerator.php');
105 $this->storage_handler = $this->createMock(StorageHandler::class);
106 $this->storage_handler_factory = $this->createMock(StorageHandlerFactory::class);
107 $this->storage_handler_factory->method(
'getPrimary')->willReturn($this->storage_handler);
108 $this->revision_repository = $this->createMock(RevisionRepository::class);
109 $this->resource_repository = $this->createMock(ResourceRepository::class);
110 $this->collection_repository = $this->createMock(CollectionRepository::class);
111 $this->information_repository = $this->createMock(InformationRepository::class);
112 $this->stakeholder_repository = $this->createMock(StakeholderRepository::class);
113 $this->flavour_repository = $this->createMock(FlavourRepository::class);
115 $this->revision_repository,
116 $this->resource_repository,
117 $this->collection_repository,
118 $this->information_repository,
119 $this->stakeholder_repository,
120 $this->flavour_repository
122 $this->locking = $this->createMock(LockHandler::class);
123 $this->stream_access = $this->createMock(StreamAccess::class);
124 $this->information = $this->createMock(Information::class);
125 $this->revision = $this->createMock(Revision::class);
132 string $expected_file_name,
133 string $expected_mime_type,
135 int $expected_version_number,
136 int $expected_owner_id
138 $identification = $this->id_generator->getUniqueResourceIdentification();
148 $expected_version_number,
155 $this->resource_repository->expects($this->once())
157 ->willReturn($blank_resource);
161 $this->revision_repository->expects($this->once())
162 ->method(
'blankFromUpload')
168 ->willReturn($blank_revision);
ILIAS ResourceStorage Resource ResourceBuilder $resource_builder
Class AbstractBaseResourceBuilderTestCase.
getDummyUploadResult(string $file_name, string $mime_type, int $size)
Class UploadedFileRevision.
mockResourceAndRevision(string $expected_file_name, string $expected_mime_type, int $expected_size, int $expected_version_number, int $expected_owner_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Repositories $repositories
setVersionNumber(int $version_number)
Class ResourceBuilderTest.