19 declare(strict_types=1);
32 $this->assertInstanceOf(Contacts::class, $this->
create());
37 $this->assertSame(
'contact_approved', $this->
create()->getProviderId());
52 $instance = $this->
create();
54 $this->
user->expects($this->once())->method(
'isAnonymous')->willReturn(
true);
56 $this->assertEquals([], $instance->getInitialUserSet());
61 $this->assertTrue($this->
create()->isHighlighted());
66 $expected =
'translated: ' . $languageKey;
68 $instance = $this->
create();
70 $this->
language->expects($this->once())->method(
'loadLanguageModule')->with(
'contact');
71 $this->
language->expects($this->once())->method(
'txt')->with($languageKey)->willReturn($expected);
73 $this->assertSame($expected, $instance->$method());
78 $this->
user = $this->getMockBuilder(ilObjUser::class)->disableOriginalConstructor()->getMock();
79 $this->
language = $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock();
81 $container = $this->getMockBuilder(Container::class)->disableOriginalConstructor()->getMock();
82 $container->expects($this->once())->method(
'user')->willReturn($this->
user);
language()
description: > Example for rendring a language glyph.