Added text align test
This commit is contained in:
parent
334422d04e
commit
f76a9cdbed
|
|
@ -12,7 +12,7 @@ class PageNumberingTest extends PHPUnit_Framework_TestCase
|
|||
TestHelper::clear();
|
||||
}
|
||||
|
||||
public function testImageWrappingStyleBehind()
|
||||
public function testSectionPageNumbering()
|
||||
{
|
||||
$PHPWord = new PHPWord();
|
||||
$section = $PHPWord->createSection();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
namespace PHPWord\Tests\Text;
|
||||
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use PHPWord;
|
||||
use PHPWord\Tests\TestHelper;
|
||||
|
||||
class AlignTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function tearDown()
|
||||
{
|
||||
TestHelper::clear();
|
||||
}
|
||||
|
||||
public function testAlign()
|
||||
{
|
||||
$PHPWord = new PHPWord();
|
||||
$section = $PHPWord->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'));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue