@@ -87,27 +87,27 @@ public function testFontNames1(): void
87
87
$ style = Helper::getTextContent ($ xpath , '/html/head/style ' );
88
88
$ prg = preg_match ('/^body[^ \\r \\n]*/m ' , $ style , $ matches );
89
89
self ::assertNotEmpty ($ matches );
90
- self ::assertSame ( 1 , $ prg );
90
+ self ::assertNotFalse ( $ prg );
91
91
self ::assertEquals ('body {font-family: \'Courier New \'; font-size: 12pt;} ' , $ matches [0 ]);
92
92
$ prg = preg_match ('/^[.]style1[^ \\r \\n]*/m ' , $ style , $ matches );
93
93
self ::assertNotEmpty ($ matches );
94
- self ::assertSame ( 1 , $ prg );
94
+ self ::assertNotFalse ( $ prg );
95
95
self ::assertEquals ('.style1 {font-family: \'Tahoma \'; font-size: 10pt; color: #1B2232; font-weight: bold;} ' , $ matches [0 ]);
96
96
$ prg = preg_match ('/^[.]style2[^ \\r \\n]*/m ' , $ style , $ matches );
97
97
self ::assertNotEmpty ($ matches );
98
- self ::assertSame ( 1 , $ prg );
98
+ self ::assertNotFalse ( $ prg );
99
99
self ::assertEquals ('.style2 {font-family: \'Arial \'; font-size: 10pt;} ' , $ matches [0 ]);
100
100
$ prg = preg_match ('/^[.]style3[^ \\r \\n]*/m ' , $ style , $ matches );
101
101
self ::assertNotEmpty ($ matches );
102
- self ::assertSame ( 1 , $ prg );
102
+ self ::assertNotFalse ( $ prg );
103
103
self ::assertEquals ('.style3 {font-family: \'hack attempt'}; display:none \'; font-size: 10pt;} ' , $ matches [0 ]);
104
104
$ prg = preg_match ('/^[.]style4[^ \\r \\n]*/m ' , $ style , $ matches );
105
105
self ::assertNotEmpty ($ matches );
106
- self ::assertSame ( 1 , $ prg );
106
+ self ::assertNotFalse ( $ prg );
107
107
self ::assertEquals ('.style4 {font-family: \'padmaa 1.1 \'; font-size: 10pt; font-weight: bold;} ' , $ matches [0 ]);
108
108
$ prg = preg_match ('/^[.]style5[^ \\r \\n]*/m ' , $ style , $ matches );
109
109
self ::assertNotEmpty ($ matches );
110
- self ::assertSame ( 1 , $ prg );
110
+ self ::assertNotFalse ( $ prg );
111
111
self ::assertEquals ('.style5 {font-family: \'MingLiU-ExtB \'; font-size: 10pt; font-weight: bold;} ' , $ matches [0 ]);
112
112
}
113
113
@@ -143,23 +143,23 @@ public function testFontNames2(): void
143
143
$ style = Helper::getTextContent ($ xpath , '/html/head/style ' );
144
144
$ prg = preg_match ('/^body[^ \\r \\n]*/m ' , $ style , $ matches );
145
145
self ::assertNotEmpty ($ matches );
146
- self ::assertSame ( 1 , $ prg );
146
+ self ::assertNotFalse ( $ prg );
147
147
self ::assertEquals ('body {font-family: \'Courier New \'; font-size: 12pt;} ' , $ matches [0 ]);
148
148
$ prg = preg_match ('/^[.]style1[^ \\r \\n]*/m ' , $ style , $ matches );
149
149
self ::assertNotEmpty ($ matches );
150
- self ::assertSame ( 1 , $ prg );
150
+ self ::assertNotFalse ( $ prg );
151
151
self ::assertEquals ('.style1 {font-family: \'Tahoma \'; font-size: 10pt; color: #1B2232; font-weight: bold;} ' , $ matches [0 ]);
152
- self ::assertNotEmpty ($ matches );
153
152
$ prg = preg_match ('/^[.]style2[^ \\r \\n]*/m ' , $ style , $ matches );
154
- self ::assertSame (1 , $ prg );
153
+ self ::assertNotEmpty ($ matches );
154
+ self ::assertNotFalse ($ prg );
155
155
self ::assertEquals ('.style2 {font-family: \'Arial \', sans-serif; font-size: 10pt;} ' , $ matches [0 ]);
156
156
$ prg = preg_match ('/^[.]style3[^ \\r \\n]*/m ' , $ style , $ matches );
157
157
self ::assertNotEmpty ($ matches );
158
- self ::assertSame ( 1 , $ prg );
158
+ self ::assertNotFalse ( $ prg );
159
159
self ::assertEquals ('.style3 {font-family: \'DejaVu Sans Monospace \', monospace; font-size: 10pt;} ' , $ matches [0 ]);
160
160
$ prg = preg_match ('/^[.]style4[^ \\r \\n]*/m ' , $ style , $ matches );
161
161
self ::assertNotEmpty ($ matches );
162
- self ::assertSame ( 1 , $ prg );
162
+ self ::assertNotFalse ( $ prg );
163
163
self ::assertEquals ('.style4 {font-family: \'Arial \'; font-size: 10pt;} ' , $ matches [0 ]);
164
164
}
165
165
@@ -195,23 +195,23 @@ public function testFontNames3(): void
195
195
$ style = Helper::getTextContent ($ xpath , '/html/head/style ' );
196
196
$ prg = preg_match ('/^body[^ \\r \\n]*/m ' , $ style , $ matches );
197
197
self ::assertNotEmpty ($ matches );
198
- self ::assertSame ( 1 , $ prg );
198
+ self ::assertNotFalse ( $ prg );
199
199
self ::assertEquals ('body {font-family: \'Courier New \', monospace; font-size: 12pt;} ' , $ matches [0 ]);
200
200
$ prg = preg_match ('/^[.]style1[^ \\r \\n]*/m ' , $ style , $ matches );
201
201
self ::assertNotEmpty ($ matches );
202
- self ::assertSame ( 1 , $ prg );
202
+ self ::assertNotFalse ( $ prg );
203
203
self ::assertEquals ('.style1 {font-family: \'Tahoma \'; font-size: 10pt; color: #1B2232; font-weight: bold;} ' , $ matches [0 ]);
204
204
$ prg = preg_match ('/^[.]style2[^ \\r \\n]*/m ' , $ style , $ matches );
205
205
self ::assertNotEmpty ($ matches );
206
- self ::assertSame ( 1 , $ prg );
206
+ self ::assertNotFalse ( $ prg );
207
207
self ::assertEquals ('.style2 {font-family: \'Arial \', sans-serif; font-size: 10pt;} ' , $ matches [0 ]);
208
208
$ prg = preg_match ('/^[.]style3[^ \\r \\n]*/m ' , $ style , $ matches );
209
209
self ::assertNotEmpty ($ matches );
210
- self ::assertSame ( 1 , $ prg );
210
+ self ::assertNotFalse ( $ prg );
211
211
self ::assertEquals ('.style3 {font-family: \'DejaVu Sans Monospace \', monospace; font-size: 10pt;} ' , $ matches [0 ]);
212
212
$ prg = preg_match ('/^[.]style4[^ \\r \\n]*/m ' , $ style , $ matches );
213
213
self ::assertNotEmpty ($ matches );
214
- self ::assertSame ( 1 , $ prg );
214
+ self ::assertNotFalse ( $ prg );
215
215
self ::assertEquals ('.style4 {font-family: \'Arial \'; font-size: 10pt;} ' , $ matches [0 ]);
216
216
}
217
217
@@ -242,19 +242,19 @@ public function testWhiteSpace(): void
242
242
self ::assertEquals ('body {font-family: \'Arial \'; font-size: 12pt; white-space: pre-wrap;} ' , $ matches [0 ]);
243
243
$ prg = preg_match ('/^[.]style1[^ \\r \\n]*/m ' , $ style , $ matches );
244
244
self ::assertNotEmpty ($ matches );
245
- self ::assertSame ( 1 , $ prg );
245
+ self ::assertNotFalse ( $ prg );
246
246
self ::assertEquals ('.style1 {font-family: \'Courier New \'; font-size: 10pt; white-space: pre-wrap;} ' , $ matches [0 ]);
247
247
$ prg = preg_match ('/^[.]style2[^ \\r \\n]*/m ' , $ style , $ matches );
248
248
self ::assertNotEmpty ($ matches );
249
- self ::assertSame ( 1 , $ prg );
249
+ self ::assertNotFalse ( $ prg );
250
250
self ::assertEquals ('.style2 {font-family: \'Courier New \'; font-size: 10pt;} ' , $ matches [0 ]);
251
251
$ prg = preg_match ('/^[.]style3[^ \\r \\n]*/m ' , $ style , $ matches );
252
252
self ::assertNotEmpty ($ matches );
253
- self ::assertSame ( 1 , $ prg );
253
+ self ::assertNotFalse ( $ prg );
254
254
self ::assertEquals ('.style3 {font-family: \'Courier New \'; font-size: 10pt; white-space: normal;} ' , $ matches [0 ]);
255
255
$ prg = preg_match ('/^[.]style4[^ \\r \\n]*/m ' , $ style , $ matches );
256
256
self ::assertNotEmpty ($ matches );
257
- self ::assertSame ( 1 , $ prg );
257
+ self ::assertNotFalse ( $ prg );
258
258
self ::assertEquals ('.style4 {font-family: \'Courier New \'; font-size: 10pt;} ' , $ matches [0 ]);
259
259
}
260
260
0 commit comments