emojiHelper = $this->createMock(IEmojiHelper::class); $this->capabilities = new Capabilities($this->emojiHelper); } /** * @param bool $supportsEmojis * * @dataProvider getCapabilitiesDataProvider */ public function testGetCapabilities(bool $supportsEmojis): void { $this->emojiHelper->expects($this->once()) ->method('doesPlatformSupportEmoji') ->willReturn($supportsEmojis); $this->assertEquals([ 'user_status' => [ 'enabled' => true, 'restore' => true, 'supports_emoji' => $supportsEmojis, ] ], $this->capabilities->getCapabilities()); } public function getCapabilitiesDataProvider(): array { return [ [true], [false], ]; } }