added setMatrix() exception tests

This commit is contained in:
smiley
2016-02-09 01:11:56 +01:00
parent 5868ee88b3
commit 50628dcda0
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -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([]);
}
+4
View File
@@ -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([]);
}