5 require_once(
'AbstractBaseTest.php');
22 require_once(
'DummyIDGenerator.php');
75 protected function setUp() : void
78 $this->storage_handler = $this->createMock(StorageHandler::class);
79 $this->storage_handler_factory = $this->createMock(StorageHandlerFactory::class);
80 $this->revision_repository = $this->createMock(RevisionRepository::class);
81 $this->resource_repository = $this->createMock(ResourceRepository::class);
82 $this->information_repository = $this->createMock(InformationRepository::class);
83 $this->stakeholder_repository = $this->createMock(StakeholderRepository::class);
84 $this->locking = $this->createMock(LockHandler::class);
85 $this->information = $this->createMock(Information::class);
86 $this->revision = $this->createMock(Revision::class);
99 string $expected_file_name,
100 string $expected_mime_type,
102 int $expected_version_number,
103 int $expected_owner_id
105 $identification = $this->id_generator->getUniqueResourceIdentification();
115 $expected_version_number,
122 $this->resource_repository->expects($this->once())
124 ->willReturn($blank_resource);
128 $this->revision_repository->expects($this->once())
129 ->method(
'blankFromUpload')
135 ->willReturn($blank_revision);
Class ResourceBuilderTest.
Class UploadedFileRevision.
Class AbstractBaseResourceBuilderTest.
mockResourceAndRevision(string $expected_file_name, string $expected_mime_type, int $expected_size, int $expected_version_number, int $expected_owner_id)
Class StorableFileResource.
setVersionNumber(int $version_number)
getDummyUploadResult(string $file_name, string $mime_type, int $size)