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();
|
TestHelper::clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testImageWrappingStyleBehind()
|
public function testSectionPageNumbering()
|
||||||
{
|
{
|
||||||
$PHPWord = new PHPWord();
|
$PHPWord = new PHPWord();
|
||||||
$section = $PHPWord->createSection();
|
$section = $PHPWord->createSection();
|
||||||
|
|||||||
27
test/PHPWord/Tests/Text/AlignTest.php
Normal file
27
test/PHPWord/Tests/Text/AlignTest.php
Normal file
@ -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…
x
Reference in New Issue
Block a user