Skip to content

Commit 3834504

Browse files
authored
Merge pull request #1744 from Manunchik/Manunchik-patch-4
Improve unit test
2 parents 777b48f + 21db2d4 commit 3834504

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/PhpWord/StyleTest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class StyleTest extends \PHPUnit\Framework\TestCase
3333
* @covers ::addParagraphStyle
3434
* @covers ::addFontStyle
3535
* @covers ::addLinkStyle
36+
* @covers ::addNumberingStyle
3637
* @covers ::addTitleStyle
3738
* @covers ::addTableStyle
3839
* @covers ::setDefaultParagraphStyle
@@ -47,19 +48,34 @@ public function testStyles()
4748
$paragraph = array('alignment' => Jc::CENTER);
4849
$font = array('italic' => true, '_bold' => true);
4950
$table = array('bgColor' => 'CCCCCC');
51+
$numbering = array(
52+
'type' => 'multilevel',
53+
'levels' => array(
54+
array(
55+
'start' => 1,
56+
'format' => 'decimal',
57+
'restart' => 1,
58+
'suffix' => 'space',
59+
'text' => '%1.',
60+
'alignment' => Jc::START,
61+
),
62+
),
63+
);
64+
5065
$styles = array(
5166
'Paragraph' => 'Paragraph',
5267
'Font' => 'Font',
5368
'Link' => 'Font',
5469
'Table' => 'Table',
5570
'Heading_1' => 'Font',
5671
'Normal' => 'Paragraph',
72+
'Numbering' => 'Numbering',
5773
);
5874

5975
Style::addParagraphStyle('Paragraph', $paragraph);
6076
Style::addFontStyle('Font', $font);
6177
Style::addLinkStyle('Link', $font);
62-
// @todo Style::addNumberingStyle
78+
Style::addNumberingStyle('Numbering', $numbering);
6379
Style::addTitleStyle(1, $font);
6480
Style::addTableStyle('Table', $table);
6581
Style::setDefaultParagraphStyle($paragraph);

0 commit comments

Comments
 (0)