File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use RowBloom \MpdfRenderer \MpdfDom ;
4
4
5
- test ( ' Dom ' , function () {
5
+ it ( ' substitutes special class elements ' , function () {
6
6
$ htmlString = '
7
7
<span class="title"></span>
8
8
<span class="date"></span>
24
24
->not ->toContain ('<span class="pageNumber"></span> ' )
25
25
->not ->toContain ('<span class="totalPages"></span> ' );
26
26
});
27
+
28
+ test ('prod bug ' , function () {
29
+ $ output1 = MpdfDom::fromString ('{PAGENO}/{nbpg} ' )
30
+ ->translateHeaderFooterClasses ()
31
+ ->toHtml ();
32
+
33
+ $ output2 = MpdfDom::fromString ('<p><span class="pageNumber"></span>/<span class="totalPages"></span></p> ' )
34
+ ->translateHeaderFooterClasses ()
35
+ ->toHtml ();
36
+
37
+ expect ($ output1 )->toBe ($ output2 );
38
+
39
+ expect (strcmp ($ output1 , $ output2 ))->toBe (0 );
40
+ });
You can’t perform that action at this time.
0 commit comments