From 50628dcda026dbf665f9ba413f8dfbd548a5e8f2 Mon Sep 17 00:00:00 2001 From: smiley Date: Tue, 9 Feb 2016 01:11:56 +0100 Subject: [PATCH] added setMatrix() exception tests --- tests/Output/ImageTest.php | 4 ++++ tests/Output/StringTest.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tests/Output/ImageTest.php b/tests/Output/ImageTest.php index dd5c1002c..6f8b01f7a 100644 --- a/tests/Output/ImageTest.php +++ b/tests/Output/ImageTest.php @@ -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([]); } diff --git a/tests/Output/StringTest.php b/tests/Output/StringTest.php index bab65ed51..9c28d5668 100644 --- a/tests/Output/StringTest.php +++ b/tests/Output/StringTest.php @@ -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([]); }