From f76a9cdbede05141dbe546d484d55742cd338284 Mon Sep 17 00:00:00 2001 From: Gabriel Bull Date: Wed, 12 Feb 2014 13:28:35 -0500 Subject: [PATCH] Added text align test --- .../Tests/Section/PageNumberingTest.php | 2 +- test/PHPWord/Tests/Text/AlignTest.php | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 test/PHPWord/Tests/Text/AlignTest.php diff --git a/test/PHPWord/Tests/Section/PageNumberingTest.php b/test/PHPWord/Tests/Section/PageNumberingTest.php index 2223973e..1d314b6c 100755 --- a/test/PHPWord/Tests/Section/PageNumberingTest.php +++ b/test/PHPWord/Tests/Section/PageNumberingTest.php @@ -12,7 +12,7 @@ class PageNumberingTest extends PHPUnit_Framework_TestCase TestHelper::clear(); } - public function testImageWrappingStyleBehind() + public function testSectionPageNumbering() { $PHPWord = new PHPWord(); $section = $PHPWord->createSection(); diff --git a/test/PHPWord/Tests/Text/AlignTest.php b/test/PHPWord/Tests/Text/AlignTest.php new file mode 100644 index 00000000..4be62465 --- /dev/null +++ b/test/PHPWord/Tests/Text/AlignTest.php @@ -0,0 +1,27 @@ +createSection(); + + $section->addText('This is my text', null, array('align' => 'right')); + + $doc = TestHelper::getDocument($PHPWord); + $element = $doc->getElement('/w:document/w:body/w:p/w:pPr/w:jc'); + + $this->assertEquals('right', $element->getAttribute('w:val')); + } +} \ No newline at end of file