public function testGetMetadata() { $sampleFile1 = test_files_path() . 'sample1.html'; $metadata = trim(TikaWrapper::getMetadata($sampleFile1)); $metadataLines = preg_split('/\\n/', $metadata); $this->assertEquals('Content-Encoding: ISO-8859-1', trim($metadataLines[0])); $this->assertEquals('Content-Length: 119', trim($metadataLines[1])); $this->assertEquals('Content-Type: text/plain; charset=ISO-8859-1', trim($metadataLines[2])); $this->assertEquals('dc:title: Some title', trim($metadataLines[3])); $this->assertEquals('resourceName: sample1.txt', trim($metadataLines[4])); $this->assertEquals('title: Some title', trim($metadataLines[5])); }
public function testGetMetadata() { $doc = new TikaWrapper($this->resource, $this->client); $metadata = $doc->getMetadata(); $this->assertInternalType('array', $metadata); }