Example #1
0
 public function testOpenCompoundFile()
 {
     $directory = new Directory\Filesystem(__DIR__ . '/_source/_files');
     $segmentInfo = new Index\SegmentInfo($directory, '_1', 2);
     $file1 = $segmentInfo->openCompoundFile('.fnm');
     $this->assertTrue($file1 instanceof File);
     $file2 = $segmentInfo->openCompoundFile('.tii');
     $file3 = $segmentInfo->openCompoundFile('.tii');
     $file4 = $segmentInfo->openCompoundFile('.tii', false);
     $this->assertTrue($file2 instanceof File);
     $this->assertTrue($file2 === $file3);
     $this->assertTrue($file4 instanceof File);
     $this->assertTrue($file2 !== $file4);
 }