| 
									
										
										
										
											2016-06-05 16:03:42 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-31 17:18:12 +00:00
										 |  |  | namespace PhpOffice\PhpSpreadsheetTests; | 
					
						
							| 
									
										
										
										
											2016-06-05 16:03:42 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | class SettingsTest extends \PHPUnit_Framework_TestCase | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     public function setUp() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     public function testGetXMLSettings() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2016-08-31 17:18:12 +00:00
										 |  |  |         $result = \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions(); | 
					
						
							| 
									
										
										
										
											2016-06-05 16:03:42 +00:00
										 |  |  |         $this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR) & $result)); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     public function testSetXMLSettings() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2016-08-31 17:18:12 +00:00
										 |  |  |         call_user_func_array([\PhpOffice\PhpSpreadsheet\Settings::class, 'setLibXmlLoaderOptions'], [LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID]); | 
					
						
							|  |  |  |         $result = \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions(); | 
					
						
							| 
									
										
										
										
											2016-06-05 16:03:42 +00:00
										 |  |  |         $this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result)); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |