From 0953065b8c2d20c1b49f62dac7920dba91cf14cd Mon Sep 17 00:00:00 2001 From: antoine Date: Fri, 28 Oct 2016 00:20:47 +0200 Subject: [PATCH] improve code coverage --- tests/PhpWord/Element/FieldTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/PhpWord/Element/FieldTest.php b/tests/PhpWord/Element/FieldTest.php index a37722e5..d4e47e62 100644 --- a/tests/PhpWord/Element/FieldTest.php +++ b/tests/PhpWord/Element/FieldTest.php @@ -119,4 +119,16 @@ class FieldTest extends \PHPUnit_Framework_TestCase $object = new Field('PAGE'); $object->setOptions(array('foo' => 'bar')); } + + /** + * Test setText exception + * + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Invalid text + */ + public function testSetTextException() + { + $object = new Field('XE'); + $object->setText(array()); + } }