🔥 v6.0 first pass: PHP 8.2, remove deprecated elements, add type hints

This commit is contained in:
smiley
2023-11-25 12:49:56 +01:00
parent a301af5b7f
commit 39e3dfe83b
80 changed files with 332 additions and 1029 deletions
+2 -15
View File
@@ -11,7 +11,7 @@
namespace chillerlan\QRCodeTest;
use chillerlan\QRCode\{QROptions, QRCode};
use chillerlan\QRCode\Output\{QRCodeOutputException, QROutputInterface};
use chillerlan\QRCode\Output\QRCodeOutputException;
use PHPUnit\Framework\TestCase;
use stdClass;
use function file_get_contents;
@@ -33,18 +33,6 @@ final class QRCodeTest extends TestCase{
$this->options = new QROptions;
}
/**
* tests if an exception is thrown when an invalid (built-in) output type is specified
*/
public function testInitOutputInterfaceException():void{
$this->expectException(QRCodeOutputException::class);
$this->expectExceptionMessage('invalid output module');
$this->options->outputType = 'foo';
$this->qrcode->setOptions($this->options)->render('test');
}
/**
* tests if an exception is thrown if the given output class does not exist
*/
@@ -52,7 +40,7 @@ final class QRCodeTest extends TestCase{
$this->expectException(QRCodeOutputException::class);
$this->expectExceptionMessage('invalid output module');
$this->options->outputType = QROutputInterface::CUSTOM;
$this->options->outputInterface = 'foo';
$this->qrcode->setOptions($this->options)->render('test');
}
@@ -64,7 +52,6 @@ final class QRCodeTest extends TestCase{
$this->expectException(QRCodeOutputException::class);
$this->expectExceptionMessage('output module does not implement QROutputInterface');
$this->options->outputType = QROutputInterface::CUSTOM;
$this->options->outputInterface = stdClass::class;
$this->qrcode->setOptions($this->options)->render('test');