createMock(IAvatar::class); $n = new AvatarNode(1024, 'png', $a); $this->assertEquals('1024.png', $n->getName()); } public function testGetContentType(): void { /** @var IAvatar | \PHPUnit\Framework\MockObject\MockObject $a */ $a = $this->createMock(IAvatar::class); $n = new AvatarNode(1024, 'png', $a); $this->assertEquals('image/png', $n->getContentType()); $n = new AvatarNode(1024, 'jpeg', $a); $this->assertEquals('image/jpeg', $n->getContentType()); } }