mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-22 03:33:30 +00:00
added setMatrix() exception tests
This commit is contained in:
@@ -66,6 +66,10 @@ class ImageTest extends \PHPUnit_Framework_TestCase{
|
||||
$this->assertEquals($expected, (new QRCode($data, new QRImage($this->options)))->output());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \chillerlan\QRCode\Output\QRCodeOutputException
|
||||
* @expectedExceptionMessage Invalid matrix!
|
||||
*/
|
||||
public function testSetMatrixException(){
|
||||
(new QRImage)->setMatrix([]);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,10 @@ class StringTest extends \PHPUnit_Framework_TestCase{
|
||||
$this->assertEquals($expected, (new QRCode($data, new QRString($this->options)))->output());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \chillerlan\QRCode\Output\QRCodeOutputException
|
||||
* @expectedExceptionMessage Invalid matrix!
|
||||
*/
|
||||
public function testSetMatrixException(){
|
||||
(new QRString)->setMatrix([]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user