decoder = new Base64ImageDecoder(); $this->decoder->setDriver(new Driver()); } public function testDecode(): void { $result = $this->decoder->decode( base64_encode($this->getTestResourceData('blue.gif')) ); $this->assertInstanceOf(Image::class, $result); } public function testDecoderInvalid(): void { $this->expectException(DecoderException::class); $this->decoder->decode('test'); } }