19declare(strict_types=1);
 
   31        $this->ilChatroomUserMock->expects($this->once())->method(
'getUserId')->willReturn(6);
 
   32        $this->ilChatroomUserMock->expects($this->once())->method(
'getUsername')->willReturn(
'username');
 
   34        $userInfo = $this->
object->getPersonalInformation($this->ilChatroomUserMock);
 
   36        $this->assertInstanceOf(stdClass::class, $userInfo);
 
   37        $this->assertSame(
'username', $userInfo->username);
 
   38        $this->assertSame(6, $userInfo->id);
 
   45        $db->expects($this->once())->method(
'fetchAssoc')->willReturn([
'object_id' => 
'6']);
 
   47        $this->assertSame(6, $this->object::_getPublicObjId());
 
   54        $db->expects($this->once())->method(
'fetchAssoc')->willReturn(
null);
 
   56        $this->assertSame(0, $this->object::_getPublicObjId());
 
   59    protected function setUp(): void
 
   65        $this->
object = (
new ReflectionClass(ilObjChatroom::class))->newInstanceWithoutConstructor();
 
Class ilChatroomAbstractTest.
 
createIlChatroomUserMock()
 
testPersonalInformationCanBeRetrieved()
 
testPublicRoomObjIdDefaultValueCanBeRetrieved()
 
testPublicRoomObjIdCanBeRetrieved()