51 protected function setUp(): void
54 $this->collection_repo = $this->createMock(CollectionRepository::class),
59 $this->resource_builder = $this->createMock(ResourceBuilder::class),
60 $this->collection_builder,
61 $this->createMock(RepositoryPreloader::class),
70 $this->collection_repo->expects($this->once())
77 $this->collection_repo->expects($this->once())
78 ->method(
'getResourceIdStrings')
96 $this->resource_builder
97 ->expects($this->exactly(6))
100 function ($rid) use (&$consecutive):
true {
101 $this->assertEquals(array_shift($consecutive), $rid);
106 $collection = $this->collections->get($rcid,
null);
108 $this->assertInstanceOf(ResourceCollection::class, $collection);
109 $this->assertNotInstanceOf(MockObject::class, $collection);
111 $this->assertEquals(3, $collection->count());
113 $collection = $this->collections->get($rcid,
null);
115 $this->assertEquals(3, $collection->count());
120 foreach ($array as $item) {
CollectionBuilder $collection_builder
ResourceBuilder MockObject $resource_builder
Class ResourceCollectionIdentification.
Interface CollectionRepository.
Class ResourceCollection.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
arrayAsGenerator(array $array)
Class ResourceIdentification.
CollectionRepository MockObject $collection_repo
Class CollectionBuilderTest.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...