getMockBuilder(LoggerInterface::class)->getMock(); $this->guestAvatar = new GuestAvatar('einstein', $logger); } /** * Asserts that testGet() returns the expected avatar. * * For the test a static name "einstein" is used and * the generated image is compared with an expected one. */ public function testGet() { $this->markTestSkipped('TODO: Disable because fails on drone'); $avatar = $this->guestAvatar->getFile(32); self::assertInstanceOf(InMemoryFile::class, $avatar); $expectedFile = file_get_contents( __DIR__ . '/../../data/guest_avatar_einstein_32.png' ); self::assertEquals(trim($expectedFile), trim($avatar->getContent())); } /** * Asserts that "testIsCustomAvatar" returns false for guests. * * @return void */ public function testIsCustomAvatar() { self::assertFalse($this->guestAvatar->isCustomAvatar()); } }