29 : void
30 {
31
32 $expected_file_name = 'info.xml';
33 $expected_owner_id = 6;
34 $expected_version_number = 99;
35 $expected_mime_type = 'text/xml';
36 $expected_size = 128;
37
39 $this->storage_handler_factory,
40 $this->repositories,
41 $this->locking,
42 $this->stream_access
43 );
44
45
47 $expected_file_name,
48 $expected_mime_type,
49 $expected_size,
50 $expected_version_number,
51 $expected_owner_id
52 );
53
54
57 $info_resolver
58 );
59
60 $this->assertEquals($identification->serialize(), $resource->getIdentification()->serialize());
61 $this->assertSame($expected_version_number, $resource->getCurrentRevision()->getVersionNumber());
62 $this->assertSame($expected_version_number, $resource->getMaxRevision());
63 $this->assertSame($expected_file_name, $resource->getCurrentRevision()->getTitle());
64 $this->assertSame($expected_owner_id, $resource->getCurrentRevision()->getOwnerId());
65 $this->assertSame($expected_file_name, $resource->getCurrentRevision()->getInformation()->getTitle());
66 $this->assertSame($expected_mime_type, $resource->getCurrentRevision()->getInformation()->getMimeType());
67 $this->assertSame($expected_size, $resource->getCurrentRevision()->getInformation()->getSize());
68 }
ResourceBuilder $resource_builder
mockResourceAndRevision(string $expected_file_name, string $expected_mime_type, int $expected_size, int $expected_version_number, int $expected_owner_id)
new(UploadResult $result, InfoResolver $info_resolver, ResourceType $type=ResourceType::SINGLE_FILE)
@inheritDoc