@@ -35,15 +35,15 @@ public function testAutoPageBreakSimple()
3535 $ proxy ->AddPage ();
3636 $ f ();
3737
38- $ this ->assertProxySame ($ proxy );
38+ $ this ->assertProxySame ($ proxy, VisualTestCase:: TOLERANCE , 72 );
3939 }
4040
4141 public function testAddPagesWithDefault ()
4242 {
4343 $ proxy = $ this ->getProxy ('L ' , 'cm ' , 'A3 ' );
4444 $ proxy ->AddPage ();
4545 $ proxy ->AddPage ();
46- $ this ->assertProxySame ($ proxy );
46+ $ this ->assertProxySame ($ proxy, VisualTestCase:: TOLERANCE , 72 );
4747 }
4848
4949 public function testAddPagesWithOwnValueAndFallback ()
@@ -52,7 +52,7 @@ public function testAddPagesWithOwnValueAndFallback()
5252 $ proxy ->AddPage ();
5353 $ proxy ->AddPage ('P ' , 'A5 ' , 180 );
5454 $ proxy ->AddPage (null , null , 0 );
55- $ this ->assertProxySame ($ proxy );
55+ $ this ->assertProxySame ($ proxy, VisualTestCase:: TOLERANCE , 72 );
5656 }
5757
5858 public function testAddPagesWithOwnSize ()
@@ -63,6 +63,19 @@ public function testAddPagesWithOwnSize()
6363 $ proxy ->AddPage (null , null , 0 );
6464 $ proxy ->AddPage ('P ' , [10 , 15 ], 90 );
6565 $ proxy ->AddPage (null , [100 , 25 ], 0 );
66- $ this ->assertProxySame ($ proxy );
66+ $ this ->assertProxySame ($ proxy , VisualTestCase::TOLERANCE , 72 );
67+ }
68+
69+ public function testDifferentOrienatations ()
70+ {
71+ $ proxy = $ this ->getProxy ('P ' , 'pt ' , [100 , 200 ]);
72+ $ proxy ->AddPage ();
73+ $ proxy ->SetDrawColor (255 , 0 , 0 );
74+ $ proxy ->Rect (2 , 2 , $ proxy ->GetPageWidth () - 4 , $ proxy ->GetPageHeight () - 4 );
75+
76+ $ proxy ->AddPage ('L ' );
77+ $ proxy ->SetDrawColor (255 , 0 , 0 );
78+ $ proxy ->Rect (2 , 2 , $ proxy ->GetPageWidth () - 4 , $ proxy ->GetPageHeight () - 4 );
79+ $ this ->assertProxySame ($ proxy , VisualTestCase::TOLERANCE , 72 );
6780 }
6881}
0 commit comments