File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public function tearDown()
12
12
TestHelper::clear ();
13
13
}
14
14
15
- public function testImageWrappingStyleBehind ()
15
+ public function testSectionPageNumbering ()
16
16
{
17
17
$ PHPWord = new PHPWord ();
18
18
$ section = $ PHPWord ->createSection ();
Original file line number Diff line number Diff line change
1
+ <?php
2
+ namespace PHPWord \Tests \Text ;
3
+
4
+ use PHPUnit_Framework_TestCase ;
5
+ use PHPWord ;
6
+ use PHPWord \Tests \TestHelper ;
7
+
8
+ class AlignTest extends PHPUnit_Framework_TestCase
9
+ {
10
+ public function tearDown ()
11
+ {
12
+ TestHelper::clear ();
13
+ }
14
+
15
+ public function testAlign ()
16
+ {
17
+ $ PHPWord = new PHPWord ();
18
+ $ section = $ PHPWord ->createSection ();
19
+
20
+ $ section ->addText ('This is my text ' , null , array ('align ' => 'right ' ));
21
+
22
+ $ doc = TestHelper::getDocument ($ PHPWord );
23
+ $ element = $ doc ->getElement ('/w:document/w:body/w:p/w:pPr/w:jc ' );
24
+
25
+ $ this ->assertEquals ('right ' , $ element ->getAttribute ('w:val ' ));
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments