writer(new PngWriter()) ->writerOptions([]) ->data('Custom QR code contents') ->encoding(new Encoding('UTF-8')) ->errorCorrectionLevel(new ErrorCorrectionLevelHigh()) ->size(300) ->margin(10) ->roundBlockSizeMode(new RoundBlockSizeModeMargin()) ->logoPath(__DIR__.'/assets/symfony.png') ->labelText('This is the label') ->labelFont(new NotoSans(20)) ->labelAlignment(new LabelAlignmentCenter()) ->build() ; $this->assertInstanceOf(PngResult::class, $result); $this->assertEquals('image/png', $result->getMimeType()); } }