url = $this->createMock(IURLGenerator::class); $this->l = $this->createMock(IL10N::class); $this->admin = new Section($this->url, $this->l); } public function testGetID(): void { $this->assertNotEmpty($this->admin->getID()); } public function testGetName(): void { $this->l->expects($this->once()) ->method('t') ->with('Talk') ->willReturnArgument(0); $this->assertNotEmpty($this->admin->getName()); } public function testGetIcon(): void { $this->url->expects($this->once()) ->method('imagePath') ->with('spreed', 'app-dark.svg') ->willReturn('apps/spreed/img/app-dark.svg'); $this->assertNotEmpty($this->admin->getIcon()); } public function testGetPriority(): void { $this->assertGreaterThan(0, $this->admin->getPriority()); } }