Skip to content

Commit e9316c0

Browse files
committed
Try to Correct Merge Conflicts in Writer/HTML/FontTest
1 parent 69faae1 commit e9316c0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/PhpWordTests/Writer/HTML/FontTest.php

+21
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This file is part of PHPWord - A pure PHP library for reading and writing
45
* word processing documents.
@@ -85,21 +86,27 @@ public function testFontNames1(): void
8586

8687
$style = Helper::getTextContent($xpath, '/html/head/style');
8788
$prg = preg_match('/^body[^\\r\\n]*/m', $style, $matches);
89+
self::assertNotEmpty($matches);
8890
self::assertSame(1, $prg);
8991
self::assertEquals('body {font-family: \'Courier New\'; font-size: 12pt;}', $matches[0]);
9092
$prg = preg_match('/^[.]style1[^\\r\\n]*/m', $style, $matches);
93+
self::assertNotEmpty($matches);
9194
self::assertSame(1, $prg);
9295
self::assertEquals('.style1 {font-family: \'Tahoma\'; font-size: 10pt; color: #1B2232; font-weight: bold;}', $matches[0]);
9396
$prg = preg_match('/^[.]style2[^\\r\\n]*/m', $style, $matches);
97+
self::assertNotEmpty($matches);
9498
self::assertSame(1, $prg);
9599
self::assertEquals('.style2 {font-family: \'Arial\'; font-size: 10pt;}', $matches[0]);
96100
$prg = preg_match('/^[.]style3[^\\r\\n]*/m', $style, $matches);
101+
self::assertNotEmpty($matches);
97102
self::assertSame(1, $prg);
98103
self::assertEquals('.style3 {font-family: \'hack attempt&#039;}; display:none\'; font-size: 10pt;}', $matches[0]);
99104
$prg = preg_match('/^[.]style4[^\\r\\n]*/m', $style, $matches);
105+
self::assertNotEmpty($matches);
100106
self::assertSame(1, $prg);
101107
self::assertEquals('.style4 {font-family: \'padmaa 1.1\'; font-size: 10pt; font-weight: bold;}', $matches[0]);
102108
$prg = preg_match('/^[.]style5[^\\r\\n]*/m', $style, $matches);
109+
self::assertNotEmpty($matches);
103110
self::assertSame(1, $prg);
104111
self::assertEquals('.style5 {font-family: \'MingLiU-ExtB\'; font-size: 10pt; font-weight: bold;}', $matches[0]);
105112
}
@@ -135,18 +142,23 @@ public function testFontNames2(): void
135142

136143
$style = Helper::getTextContent($xpath, '/html/head/style');
137144
$prg = preg_match('/^body[^\\r\\n]*/m', $style, $matches);
145+
self::assertNotEmpty($matches);
138146
self::assertSame(1, $prg);
139147
self::assertEquals('body {font-family: \'Courier New\'; font-size: 12pt;}', $matches[0]);
140148
$prg = preg_match('/^[.]style1[^\\r\\n]*/m', $style, $matches);
149+
self::assertNotEmpty($matches);
141150
self::assertSame(1, $prg);
142151
self::assertEquals('.style1 {font-family: \'Tahoma\'; font-size: 10pt; color: #1B2232; font-weight: bold;}', $matches[0]);
152+
self::assertNotEmpty($matches);
143153
$prg = preg_match('/^[.]style2[^\\r\\n]*/m', $style, $matches);
144154
self::assertSame(1, $prg);
145155
self::assertEquals('.style2 {font-family: \'Arial\', sans-serif; font-size: 10pt;}', $matches[0]);
146156
$prg = preg_match('/^[.]style3[^\\r\\n]*/m', $style, $matches);
157+
self::assertNotEmpty($matches);
147158
self::assertSame(1, $prg);
148159
self::assertEquals('.style3 {font-family: \'DejaVu Sans Monospace\', monospace; font-size: 10pt;}', $matches[0]);
149160
$prg = preg_match('/^[.]style4[^\\r\\n]*/m', $style, $matches);
161+
self::assertNotEmpty($matches);
150162
self::assertSame(1, $prg);
151163
self::assertEquals('.style4 {font-family: \'Arial\'; font-size: 10pt;}', $matches[0]);
152164
}
@@ -182,18 +194,23 @@ public function testFontNames3(): void
182194

183195
$style = Helper::getTextContent($xpath, '/html/head/style');
184196
$prg = preg_match('/^body[^\\r\\n]*/m', $style, $matches);
197+
self::assertNotEmpty($matches);
185198
self::assertSame(1, $prg);
186199
self::assertEquals('body {font-family: \'Courier New\', monospace; font-size: 12pt;}', $matches[0]);
187200
$prg = preg_match('/^[.]style1[^\\r\\n]*/m', $style, $matches);
201+
self::assertNotEmpty($matches);
188202
self::assertSame(1, $prg);
189203
self::assertEquals('.style1 {font-family: \'Tahoma\'; font-size: 10pt; color: #1B2232; font-weight: bold;}', $matches[0]);
190204
$prg = preg_match('/^[.]style2[^\\r\\n]*/m', $style, $matches);
205+
self::assertNotEmpty($matches);
191206
self::assertSame(1, $prg);
192207
self::assertEquals('.style2 {font-family: \'Arial\', sans-serif; font-size: 10pt;}', $matches[0]);
193208
$prg = preg_match('/^[.]style3[^\\r\\n]*/m', $style, $matches);
209+
self::assertNotEmpty($matches);
194210
self::assertSame(1, $prg);
195211
self::assertEquals('.style3 {font-family: \'DejaVu Sans Monospace\', monospace; font-size: 10pt;}', $matches[0]);
196212
$prg = preg_match('/^[.]style4[^\\r\\n]*/m', $style, $matches);
213+
self::assertNotEmpty($matches);
197214
self::assertSame(1, $prg);
198215
self::assertEquals('.style4 {font-family: \'Arial\'; font-size: 10pt;}', $matches[0]);
199216
}
@@ -224,15 +241,19 @@ public function testWhiteSpace(): void
224241
self::assertNotFalse(preg_match('/^body[^\\r\\n]*/m', $style, $matches));
225242
self::assertEquals('body {font-family: \'Arial\'; font-size: 12pt; white-space: pre-wrap;}', $matches[0]);
226243
$prg = preg_match('/^[.]style1[^\\r\\n]*/m', $style, $matches);
244+
self::assertNotEmpty($matches);
227245
self::assertSame(1, $prg);
228246
self::assertEquals('.style1 {font-family: \'Courier New\'; font-size: 10pt; white-space: pre-wrap;}', $matches[0]);
229247
$prg = preg_match('/^[.]style2[^\\r\\n]*/m', $style, $matches);
248+
self::assertNotEmpty($matches);
230249
self::assertSame(1, $prg);
231250
self::assertEquals('.style2 {font-family: \'Courier New\'; font-size: 10pt;}', $matches[0]);
232251
$prg = preg_match('/^[.]style3[^\\r\\n]*/m', $style, $matches);
252+
self::assertNotEmpty($matches);
233253
self::assertSame(1, $prg);
234254
self::assertEquals('.style3 {font-family: \'Courier New\'; font-size: 10pt; white-space: normal;}', $matches[0]);
235255
$prg = preg_match('/^[.]style4[^\\r\\n]*/m', $style, $matches);
256+
self::assertNotEmpty($matches);
236257
self::assertSame(1, $prg);
237258
self::assertEquals('.style4 {font-family: \'Courier New\'; font-size: 10pt;}', $matches[0]);
238259
}

0 commit comments

Comments
 (0)