Skip to content

Commit 0953065

Browse files
committed
improve code coverage
1 parent d52d9b8 commit 0953065

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/PhpWord/Element/FieldTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,16 @@ public function testSetOptionsException()
119119
$object = new Field('PAGE');
120120
$object->setOptions(array('foo' => 'bar'));
121121
}
122+
123+
/**
124+
* Test setText exception
125+
*
126+
* @expectedException \InvalidArgumentException
127+
* @expectedExceptionMessage Invalid text
128+
*/
129+
public function testSetTextException()
130+
{
131+
$object = new Field('XE');
132+
$object->setText(array());
133+
}
122134
}

0 commit comments

Comments
 (0)