@@ -195,7 +195,7 @@ public function testCanAddCoverFromFile()
195
195
196
196
$ tmpFile = $ pdf ->getPdfFilename ();
197
197
$ command = (string )$ pdf ->getCommand ();
198
- $ this ->assertEquals ("$ binary cover ' $ inFile' ' $ tmpFile' " , $ command );
198
+ $ this ->assertEquals ("$ binary ' cover' ' $ inFile' ' $ tmpFile' " , $ command );
199
199
unlink ($ outFile );
200
200
}
201
201
public function testCanAddCoverFromHtmlString ()
@@ -210,7 +210,7 @@ public function testCanAddCoverFromHtmlString()
210
210
$ this ->assertFileExists ($ outFile );
211
211
212
212
$ tmpFile = $ pdf ->getPdfFilename ();
213
- $ this ->assertRegExp ("# $ binary cover '[^ ]+' ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
213
+ $ this ->assertRegExp ("# $ binary ' cover' '[^ ]+' ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
214
214
unlink ($ outFile );
215
215
}
216
216
public function testCanAddCoverFromUrl ()
@@ -226,7 +226,7 @@ public function testCanAddCoverFromUrl()
226
226
$ this ->assertFileExists ($ outFile );
227
227
228
228
$ tmpFile = $ pdf ->getPdfFilename ();
229
- $ this ->assertEquals ("$ binary cover ' $ url' ' $ tmpFile' " , (string ) $ pdf ->getCommand ());
229
+ $ this ->assertEquals ("$ binary ' cover' ' $ url' ' $ tmpFile' " , (string ) $ pdf ->getCommand ());
230
230
unlink ($ outFile );
231
231
}
232
232
@@ -243,7 +243,7 @@ public function testCanAddToc()
243
243
$ this ->assertFileExists ($ outFile );
244
244
245
245
$ tmpFile = $ pdf ->getPdfFilename ();
246
- $ this ->assertRegExp ("# $ binary '[^ ]+' toc ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
246
+ $ this ->assertRegExp ("# $ binary '[^ ]+' ' toc' ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
247
247
unlink ($ outFile );
248
248
}
249
249
@@ -287,7 +287,7 @@ public function testCanPassGlobalOptionsInConstructor()
287
287
$ this ->assertTrue ($ pdf ->saveAs ($ outFile ));
288
288
289
289
$ this ->assertFileExists ($ outFile );
290
- $ this ->assertRegExp ("# $ binary --header-html ' $ tmpDir/tmp_wkhtmlto_pdf_[^ ]+\.html' --no-outline --margin-top '0' --allow '/tmp' --allow '/test' ' $ inFile' ' $ tmpDir/tmp_wkhtmlto_pdf_[^ ]+\.pdf'# " , (string ) $ pdf ->getCommand ());
290
+ $ this ->assertRegExp ("# $ binary ' --header-html' ' $ tmpDir/tmp_wkhtmlto_pdf_[^ ]+\.html' ' --no-outline' ' --margin-top' '0' ' --allow' '/tmp' ' --allow' '/test' ' $ inFile' ' $ tmpDir/tmp_wkhtmlto_pdf_[^ ]+\.pdf'# " , (string ) $ pdf ->getCommand ());
291
291
unlink ($ outFile );
292
292
}
293
293
public function testCanSetGlobalOptions ()
@@ -307,7 +307,7 @@ public function testCanSetGlobalOptions()
307
307
$ this ->assertFileExists ($ outFile );
308
308
309
309
$ tmpFile = $ pdf ->getPdfFilename ();
310
- $ this ->assertEquals ("$ binary --no-outline --margin-top '0' ' $ inFile' ' $ tmpFile' " , (string ) $ pdf ->getCommand ());
310
+ $ this ->assertEquals ("$ binary ' --no-outline' ' --margin-top' '0' ' $ inFile' ' $ tmpFile' " , (string ) $ pdf ->getCommand ());
311
311
unlink ($ outFile );
312
312
}
313
313
public function testSetPageCoverAndTocOptions ()
@@ -344,7 +344,7 @@ public function testSetPageCoverAndTocOptions()
344
344
$ this ->assertFileExists ($ outFile );
345
345
346
346
$ tmpFile = $ pdf ->getPdfFilename ();
347
- $ this ->assertEquals ("$ binary --no-outline --margin-top '0' --header-center 'test {x} {y}' ' $ inFile' --no-background --zoom '1.5' --cookie 'name' 'value' --replace 'x' 'v' --replace 'y' '' cover ' $ inFile' --replace 'x' 'a' --replace 'y' 'b' toc --disable-dotted-lines ' $ tmpFile' " , (string ) $ pdf ->getCommand ());
347
+ $ this ->assertEquals ("$ binary ' --no-outline' ' --margin-top' '0' ' --header-center' 'test {x} {y}' ' $ inFile' ' --no-background' ' --zoom' '1.5' ' --cookie' 'name' 'value' ' --replace' 'x' 'v' ' --replace' 'y' '' ' cover' ' $ inFile' ' --replace' 'x' 'a' ' --replace' 'y' 'b' ' toc' ' --disable-dotted-lines' ' $ tmpFile' " , (string ) $ pdf ->getCommand ());
348
348
unlink ($ outFile );
349
349
}
350
350
public function testCanAddHeaderAndFooterAsHtml ()
@@ -363,7 +363,7 @@ public function testCanAddHeaderAndFooterAsHtml()
363
363
$ this ->assertFileExists ($ outFile );
364
364
365
365
$ tmpFile = $ pdf ->getPdfFilename ();
366
- $ this ->assertRegExp ("# $ binary --header-html '/tmp/[^ ]+' --footer-html '/tmp/[^ ]+' ' $ inFile' ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
366
+ $ this ->assertRegExp ("# $ binary ' --header-html' '/tmp/[^ ]+' ' --footer-html' '/tmp/[^ ]+' ' $ inFile' ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
367
367
unlink ($ outFile );
368
368
}
369
369
public function testCanAddHeaderAndFooterAsFile ()
@@ -382,7 +382,7 @@ public function testCanAddHeaderAndFooterAsFile()
382
382
$ this ->assertFileExists ($ outFile );
383
383
384
384
$ tmpFile = $ pdf ->getPdfFilename ();
385
- $ this ->assertRegExp ("# $ binary --header-html '/tmp/[^ ]+' --footer-html '/tmp/[^ ]+' ' $ inFile' ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
385
+ $ this ->assertRegExp ("# $ binary ' --header-html' '/tmp/[^ ]+' ' --footer-html' '/tmp/[^ ]+' ' $ inFile' ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
386
386
unlink ($ outFile );
387
387
}
388
388
public function testCanAddHeaderAndFooterAsHtmlToPagesAndCoverAndToc ()
@@ -410,7 +410,7 @@ public function testCanAddHeaderAndFooterAsHtmlToPagesAndCoverAndToc()
410
410
$ this ->assertFileExists ($ outFile );
411
411
412
412
$ tmpFile = $ pdf ->getPdfFilename ();
413
- $ this ->assertRegExp ("# $ binary '/tmp/[^ ]+\.html' --header-html '/tmp/[^ ]+\.html' --footer-html '/tmp/[^ ]+\.html' cover ' $ inFile' --header-html '/tmp/[^ ]+\.html' --footer-html '/tmp/[^ ]+\.html' toc --header-html '/tmp/[^ ]+\.html' --footer-html '/tmp/[^ ]+\.html' ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
413
+ $ this ->assertRegExp ("# $ binary '/tmp/[^ ]+\.html' ' --header-html' '/tmp/[^ ]+\.html' ' --footer-html' '/tmp/[^ ]+\.html' ' cover' ' $ inFile' ' --header-html' '/tmp/[^ ]+\.html' ' --footer-html' '/tmp/[^ ]+\.html' ' toc' ' --header-html' '/tmp/[^ ]+\.html' ' --footer-html' '/tmp/[^ ]+\.html' ' $ tmpFile'# " , (string ) $ pdf ->getCommand ());
414
414
unlink ($ outFile );
415
415
}
416
416
0 commit comments