Просмотр исходного кода

added setMatrix() exception tests

smiley 10 лет назад
Родитель
Сommit
50628dcda0
2 измененных файлов с 8 добавлено и 0 удалено
  1. 4 0
      tests/Output/ImageTest.php
  2. 4 0
      tests/Output/StringTest.php

+ 4 - 0
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([]);
 	}

+ 4 - 0
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([]);
 	}