@@ -49,8 +49,8 @@ public function testCopyClone(string $type): void
4949 } else {
5050 $ this ->spreadsheet2 = clone $ this ->spreadsheet ;
5151 }
52- self ::assertSame ($ this ->spreadsheet , $ this ->spreadsheet ->getCalculationEngine ()->getSpreadsheet ());
53- self ::assertSame ($ this ->spreadsheet2 , $ this ->spreadsheet2 ->getCalculationEngine ()->getSpreadsheet ());
52+ self ::assertSame ($ this ->spreadsheet , $ this ->spreadsheet ->getCalculationEngine ()? ->getSpreadsheet());
53+ self ::assertSame ($ this ->spreadsheet2 , $ this ->spreadsheet2 ->getCalculationEngine ()? ->getSpreadsheet());
5454 self ::assertSame ('A3 ' , $ sheet ->getSelectedCells ());
5555 $ copysheet = $ this ->spreadsheet2 ->getActiveSheet ();
5656 self ::assertSame ('A3 ' , $ copysheet ->getSelectedCells ());
@@ -132,6 +132,7 @@ public function testCopyClone2(string $type, bool $suppress, bool $cache, bool $
132132 {
133133 $ this ->spreadsheet = new Spreadsheet ();
134134 $ calc = $ this ->spreadsheet ->getCalculationEngine ();
135+ self ::assertNotNull ($ calc );
135136 $ calc ->setSuppressFormulaErrors ($ suppress );
136137 $ calc ->setCalculationCacheEnabled ($ cache );
137138 $ calc ->setBranchPruningEnabled ($ pruning );
@@ -142,6 +143,7 @@ public function testCopyClone2(string $type, bool $suppress, bool $cache, bool $
142143 $ this ->spreadsheet2 = clone $ this ->spreadsheet ;
143144 }
144145 $ calc2 = $ this ->spreadsheet2 ->getCalculationEngine ();
146+ self ::assertNotNull ($ calc2 );
145147 self ::assertSame ($ suppress , $ calc2 ->getSuppressFormulaErrors ());
146148 self ::assertSame ($ cache , $ calc2 ->getCalculationCacheEnabled ());
147149 self ::assertSame ($ pruning , $ calc2 ->getBranchPruningEnabled ());
0 commit comments