@@ -21,8 +21,8 @@ |
||
| 21 | 21 | { |
| 22 | 22 | parent::setUp(); |
| 23 | 23 | |
| 24 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/libraries.csv'); |
|
| 25 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/metadata.csv'); |
|
| 24 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/libraries.csv'); |
|
| 25 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/metadata.csv'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -21,11 +21,11 @@ |
||
| 21 | 21 | class SolrSearchTest extends FunctionalTestCase |
| 22 | 22 | { |
| 23 | 23 | private static array $databaseFixtures = [ |
| 24 | - __DIR__ . '/../../Fixtures/Common/solrcores.csv' |
|
| 24 | + __DIR__.'/../../Fixtures/Common/solrcores.csv' |
|
| 25 | 25 | ]; |
| 26 | 26 | |
| 27 | 27 | private static array $solrFixtures = [ |
| 28 | - __DIR__ . '/../../Fixtures/Common/documents_1.solr.json' |
|
| 28 | + __DIR__.'/../../Fixtures/Common/documents_1.solr.json' |
|
| 29 | 29 | ]; |
| 30 | 30 | |
| 31 | 31 | private Solr $solr; |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | $this->documentRepository = $this->initializeRepository(DocumentRepository::class, 20000); |
| 46 | 46 | $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, 20000); |
| 47 | 47 | |
| 48 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.csv'); |
|
| 49 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/libraries.csv'); |
|
| 50 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/metadata.csv'); |
|
| 48 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/documents_1.csv'); |
|
| 49 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/libraries.csv'); |
|
| 50 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/metadata.csv'); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -128,9 +128,9 @@ discard block |
||
| 128 | 128 | { |
| 129 | 129 | $core = $this->createSolrCore(); |
| 130 | 130 | |
| 131 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/documents_fulltext.csv'); |
|
| 132 | - $this->importSolrDocuments($core->solr, __DIR__ . '/../../Fixtures/Common/documents_1.solr.json'); |
|
| 133 | - $this->importSolrDocuments($core->solr, __DIR__ . '/../../Fixtures/Common/documents_fulltext.solr.json'); |
|
| 131 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/documents_fulltext.csv'); |
|
| 132 | + $this->importSolrDocuments($core->solr, __DIR__.'/../../Fixtures/Common/documents_1.solr.json'); |
|
| 133 | + $this->importSolrDocuments($core->solr, __DIR__.'/../../Fixtures/Common/documents_fulltext.solr.json'); |
|
| 134 | 134 | |
| 135 | 135 | $collections = $this->collectionRepository->findCollectionsBySettings([ |
| 136 | 136 | 'index_name' => ['Musik', 'Projekt: Dresdner Hefte'], |
@@ -23,13 +23,13 @@ |
||
| 23 | 23 | private $solrCoreRepository; |
| 24 | 24 | |
| 25 | 25 | private static array $databaseFixtures = [ |
| 26 | - __DIR__ . '/../../Fixtures/Common/documents_1.csv', |
|
| 27 | - __DIR__ . '/../../Fixtures/Common/pages.csv', |
|
| 28 | - __DIR__ . '/../../Fixtures/Common/solrcores.csv' |
|
| 26 | + __DIR__.'/../../Fixtures/Common/documents_1.csv', |
|
| 27 | + __DIR__.'/../../Fixtures/Common/pages.csv', |
|
| 28 | + __DIR__.'/../../Fixtures/Common/solrcores.csv' |
|
| 29 | 29 | ]; |
| 30 | 30 | |
| 31 | 31 | private static array $solrFixtures = [ |
| 32 | - __DIR__ . '/../../Fixtures/Common/documents_1.solr.json' |
|
| 32 | + __DIR__.'/../../Fixtures/Common/documents_1.solr.json' |
|
| 33 | 33 | ]; |
| 34 | 34 | |
| 35 | 35 | public function setUp(): void |
@@ -21,13 +21,13 @@ |
||
| 21 | 21 | { |
| 22 | 22 | |
| 23 | 23 | private static array $databaseFixtures = [ |
| 24 | - __DIR__ . '/../../Fixtures/Common/documents_1.csv', |
|
| 25 | - __DIR__ . '/../../Fixtures/Common/pages.csv', |
|
| 26 | - __DIR__ . '/../../Fixtures/Common/solrcores.csv' |
|
| 24 | + __DIR__.'/../../Fixtures/Common/documents_1.csv', |
|
| 25 | + __DIR__.'/../../Fixtures/Common/pages.csv', |
|
| 26 | + __DIR__.'/../../Fixtures/Common/solrcores.csv' |
|
| 27 | 27 | ]; |
| 28 | 28 | |
| 29 | 29 | private static array $solrFixtures = [ |
| 30 | - __DIR__ . '/../../Fixtures/Common/documents_1.solr.json' |
|
| 30 | + __DIR__.'/../../Fixtures/Common/documents_1.solr.json' |
|
| 31 | 31 | ]; |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -21,14 +21,14 @@ |
||
| 21 | 21 | { |
| 22 | 22 | parent::setUp(); |
| 23 | 23 | |
| 24 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.csv'); |
|
| 25 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/metadata.csv'); |
|
| 26 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/MetsDocument/metadata_mets.csv'); |
|
| 24 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/documents_1.csv'); |
|
| 25 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/metadata.csv'); |
|
| 26 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/MetsDocument/metadata_mets.csv'); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | protected function doc(string $file) |
| 30 | 30 | { |
| 31 | - $url = 'http://web:8001/Tests/Fixtures/MetsDocument/' . $file; |
|
| 31 | + $url = 'http://web:8001/Tests/Fixtures/MetsDocument/'.$file; |
|
| 32 | 32 | $doc = AbstractDocument::getInstance($url, ['general' => ['useExternalApisForMetadata' => 0]]); |
| 33 | 33 | self::assertNotNull($doc); |
| 34 | 34 | return $doc; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | if (!empty($name)) { |
| 125 | 125 | $this->metadata['author'][$i] = [ |
| 126 | 126 | 'name' => $name, |
| 127 | - 'url' => 'https://orcid.org/' . $orcidId |
|
| 127 | + 'url' => 'https://orcid.org/'.$orcidId |
|
| 128 | 128 | ]; |
| 129 | 129 | } else { |
| 130 | 130 | //fallback into display form |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | // Append "valueURI" to name using Unicode unit separator. |
| 183 | 183 | if (!empty($authors[$i]->getValueURI())) { |
| 184 | - $this->metadata['author'][$i] .= pack('C', 31) . $authors[$i]->getValueURI(); |
|
| 184 | + $this->metadata['author'][$i] .= pack('C', 31).$authors[$i]->getValueURI(); |
|
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | if (!empty($name)) { |
| 245 | 245 | $this->metadata['holder'][$i] = [ |
| 246 | 246 | 'name' => $name, |
| 247 | - 'url' => 'http://viaf.org/viaf/' . $viafId |
|
| 247 | + 'url' => 'http://viaf.org/viaf/'.$viafId |
|
| 248 | 248 | ]; |
| 249 | 249 | } else { |
| 250 | 250 | //fallback into display form |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | $this->getHolderFromXmlDisplayForm($holders, $i); |
| 268 | 268 | // Append "valueURI" to name using Unicode unit separator. |
| 269 | 269 | if (!empty($holders[$i]->getValueURI())) { |
| 270 | - $this->metadata['holder'][$i] .= pack('C', 31) . $holders[$i]->getValueURI(); |
|
| 270 | + $this->metadata['holder'][$i] .= pack('C', 31).$holders[$i]->getValueURI(); |
|
| 271 | 271 | } |
| 272 | 272 | } |
| 273 | 273 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | foreach ($this->requiredMetadataFields as $requiredMetadataField) { |
| 84 | 84 | if (empty($this->metadata[$requiredMetadataField][0])) { |
| 85 | - $this->logger->error('Missing required metadata field "' . $requiredMetadataField . '".'); |
|
| 85 | + $this->logger->error('Missing required metadata field "'.$requiredMetadataField.'".'); |
|
| 86 | 86 | return false; |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -100,14 +100,14 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function hasCorrectLogicalStructure(string $type): bool |
| 102 | 102 | { |
| 103 | - $expectedNodes = $this->xml->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div[@TYPE="' . $type . '"]'); |
|
| 103 | + $expectedNodes = $this->xml->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div[@TYPE="'.$type.'"]'); |
|
| 104 | 104 | if ($expectedNodes) { |
| 105 | 105 | return true; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | $existingNodes = $this->xml->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div'); |
| 109 | 109 | if ($existingNodes) { |
| 110 | - $this->logger->error('Document contains logical structure but @TYPE="' . $type . '" is missing.'); |
|
| 110 | + $this->logger->error('Document contains logical structure but @TYPE="'.$type.'" is missing.'); |
|
| 111 | 111 | return false; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | |
| 106 | 106 | private function getXml(string $file): SimpleXMLElement |
| 107 | 107 | { |
| 108 | - $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/MetsDocument/' . $file); |
|
| 108 | + $xml = simplexml_load_file(__DIR__.'/../../Fixtures/MetsDocument/'.$file); |
|
| 109 | 109 | self::assertNotFalse($xml); |
| 110 | 110 | return $xml; |
| 111 | 111 | } |