mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-30 03:58:28 +00:00
:octocat: +several coverage tests & cleanup
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
namespace chillerlan\QRCodeTest\Common;
|
||||
|
||||
use chillerlan\QRCode\Common\{BitBuffer, Mode};
|
||||
use chillerlan\QRCode\QRCodeException;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
@@ -42,4 +43,12 @@ final class BitBufferTest extends TestCase{
|
||||
$this::assertSame(4, $this->bitBuffer->getLength());
|
||||
}
|
||||
|
||||
public function testReadException():void{
|
||||
$this->expectException(QRCodeException::class);
|
||||
$this->expectExceptionMessage('invalid $numBits');
|
||||
|
||||
$this->bitBuffer->put(Mode::KANJI, 4);
|
||||
$this->bitBuffer->read($this->bitBuffer->available() + 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user