| 
									
										
										
										
											2018-10-07 07:38:13 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace PhpOffice\PhpSpreadsheetTests\Shared; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | use PhpOffice\PhpSpreadsheet\Shared\OLERead; | 
					
						
							|  |  |  | use PHPUnit\Framework\TestCase; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class OLEReadTest extends TestCase | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2020-05-18 04:49:57 +00:00
										 |  |  |     public function testReadOleStreams(): void | 
					
						
							| 
									
										
										
										
											2018-10-07 07:38:13 +00:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2020-05-17 09:35:55 +00:00
										 |  |  |         $dataDir = 'tests/data/Shared/OLERead/'; | 
					
						
							| 
									
										
										
										
											2018-10-07 07:38:13 +00:00
										 |  |  |         $ole = new OLERead(); | 
					
						
							| 
									
										
										
										
											2020-05-17 09:35:55 +00:00
										 |  |  |         $ole->read('tests/data/Reader/XLS/sample.xls'); | 
					
						
							| 
									
										
										
										
											2018-10-07 07:38:13 +00:00
										 |  |  |         self::assertEquals( | 
					
						
							|  |  |  |             file_get_contents($dataDir . 'wrkbook'), | 
					
						
							|  |  |  |             $ole->getStream($ole->wrkbook) | 
					
						
							|  |  |  |         ); | 
					
						
							|  |  |  |         self::assertEquals( | 
					
						
							|  |  |  |             file_get_contents($dataDir . 'summary'), | 
					
						
							|  |  |  |             $ole->getStream($ole->summaryInformation) | 
					
						
							|  |  |  |         ); | 
					
						
							|  |  |  |         self::assertEquals( | 
					
						
							|  |  |  |             file_get_contents($dataDir . 'document'), | 
					
						
							|  |  |  |             $ole->getStream($ole->documentSummaryInformation) | 
					
						
							|  |  |  |         ); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |