diff --git a/modules/oai/views/helpers/ListMetaDataFormats.php b/modules/oai/views/helpers/ListMetadataFormats.php
similarity index 85%
rename from modules/oai/views/helpers/ListMetaDataFormats.php
rename to modules/oai/views/helpers/ListMetadataFormats.php
index 9d793c6e6..5fa992d25 100644
--- a/modules/oai/views/helpers/ListMetaDataFormats.php
+++ b/modules/oai/views/helpers/ListMetadataFormats.php
@@ -35,7 +35,7 @@
/**
* View helper for rendering metadata formats list.
*/
-class Oai_View_Helper_ListMetaDataFormats extends Application_View_Helper_Abstract
+class Oai_View_Helper_ListMetadataFormats extends Application_View_Helper_Abstract
{
/**
* Returns XML for rendering the metadata formats list.
@@ -71,14 +71,16 @@ public function listMetadataFormats()
throw new Exception($message);
}
- $output .= ''
- . "$prefix"
- . "$schemaUrl"
- . "$metadataNamespaceUrl"
- . '';
+ $output .= PHP_EOL;
+ $output .= ' ' . PHP_EOL;
+ $output .= " $prefix" . PHP_EOL;
+ $output .= " $schemaUrl" . PHP_EOL;
+ $output .= " $metadataNamespaceUrl" . PHP_EOL;
+ $output .= ' ';
}
}
}
+ $output .= PHP_EOL . ' ';
}
return $output;
diff --git a/tests/modules/oai/views/helpers/ListMetaDataFormatsTest.php b/tests/modules/oai/views/helpers/ListMetadataFormatsTest.php
similarity index 67%
rename from tests/modules/oai/views/helpers/ListMetaDataFormatsTest.php
rename to tests/modules/oai/views/helpers/ListMetadataFormatsTest.php
index f1f39e4da..d8df072a1 100644
--- a/tests/modules/oai/views/helpers/ListMetaDataFormatsTest.php
+++ b/tests/modules/oai/views/helpers/ListMetadataFormatsTest.php
@@ -29,7 +29,7 @@
* @license http://www.gnu.org/licenses/gpl.html General Public License
*/
-class Oai_View_Helper_ListMetaDataFormatsTest extends ControllerTestCase
+class Oai_View_Helper_ListMetadataFormatsTest extends ControllerTestCase
{
/** @var string */
protected $additionalResources = 'database';
@@ -39,26 +39,30 @@ class Oai_View_Helper_ListMetaDataFormatsTest extends ControllerTestCase
*/
protected function getExpectedMetadaFormats()
{
- return ''
- . 'oai_dc'
- . 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd'
- . 'http://www.openarchives.org/OAI/2.0/oai_dc/'
- . ''
- . ''
- . 'epicur'
- . 'http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd'
- . 'urn:nbn:de:1111-2004033116'
- . ''
- . ''
- . 'xMetaDissPlus'
- . 'http://files.dnb.de/standards/xmetadissplus/xmetadissplus.xsd'
- . 'http://www.d-nb.de/standards/xmetadissplus/'
- . ''
- . ''
- . 'MARC21'
- . 'https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd'
- . 'http://www.loc.gov/MARC21/slim'
- . '';
+ return <<
+ oai_dc
+ http://www.openarchives.org/OAI/2.0/oai_dc.xsd
+ http://www.openarchives.org/OAI/2.0/oai_dc/
+
+
+ epicur
+ http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd
+ urn:nbn:de:1111-2004033116
+
+
+ xMetaDissPlus
+ http://files.dnb.de/standards/xmetadissplus/xmetadissplus.xsd
+ http://www.d-nb.de/standards/xmetadissplus/
+
+
+ MARC21
+ https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
+ http://www.loc.gov/MARC21/slim
+
+
+TEXT;
}
/**
@@ -66,26 +70,30 @@ protected function getExpectedMetadaFormats()
*/
protected function getExpectedMetadaFormatsWithoutOaiDc()
{
- return ''
- . 'epicur'
- . 'http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd'
- . 'urn:nbn:de:1111-2004033116'
- . ''
- . ''
- . 'xMetaDissPlus'
- . 'http://files.dnb.de/standards/xmetadissplus/xmetadissplus.xsd'
- . 'http://www.d-nb.de/standards/xmetadissplus/'
- . ''
- . ''
- . 'MARC21'
- . 'https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd'
- . 'http://www.loc.gov/MARC21/slim'
- . '';
+ return <<
+ epicur
+ http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd
+ urn:nbn:de:1111-2004033116
+
+
+ xMetaDissPlus
+ http://files.dnb.de/standards/xmetadissplus/xmetadissplus.xsd
+ http://www.d-nb.de/standards/xmetadissplus/
+
+
+ MARC21
+ https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
+ http://www.loc.gov/MARC21/slim
+
+
+TEXT;
}
public function testListMetadataFormats()
{
- $listMetaDataFormats = new Oai_View_Helper_ListMetaDataFormats();
+ $listMetaDataFormats = new Oai_View_Helper_ListMetadataFormats();
$this->assertEquals($this->getExpectedMetadaFormats(), $listMetaDataFormats->listMetadataFormats());
}
@@ -104,7 +112,7 @@ public function testListMetadataFormatsFormatNotVisible()
],
]);
- $listMetaDataFormats = new Oai_View_Helper_ListMetaDataFormats();
+ $listMetaDataFormats = new Oai_View_Helper_ListMetadataFormats();
$this->assertEquals($this->getExpectedMetadaFormatsWithoutOaiDc(), $listMetaDataFormats->listMetadataFormats());
}
@@ -123,7 +131,7 @@ public function testListMetadataFormatsFormatNotVisibleAndAdminOnly()
],
]);
- $listMetaDataFormats = new Oai_View_Helper_ListMetaDataFormats();
+ $listMetaDataFormats = new Oai_View_Helper_ListMetadataFormats();
$this->assertEquals($this->getExpectedMetadaFormatsWithoutOaiDc(), $listMetaDataFormats->listMetadataFormats());
}
@@ -142,7 +150,7 @@ public function testListMetadataFormatsFormatVisible()
],
]);
- $listMetaDataFormats = new Oai_View_Helper_ListMetaDataFormats();
+ $listMetaDataFormats = new Oai_View_Helper_ListMetadataFormats();
$this->assertEquals($this->getExpectedMetadaFormats(), $listMetaDataFormats->listMetadataFormats());
}
@@ -161,7 +169,7 @@ public function testListMetadataFormatsFormatVisibleAndAdminOnly()
],
]);
- $listMetaDataFormats = new Oai_View_Helper_ListMetaDataFormats();
+ $listMetaDataFormats = new Oai_View_Helper_ListMetadataFormats();
$this->assertEquals($this->getExpectedMetadaFormatsWithoutOaiDc(), $listMetaDataFormats->listMetadataFormats());
}
@@ -181,7 +189,7 @@ public function testListMetadataFormatsAsAdminWithFormatNotVisible()
],
]);
- $listMetaDataFormats = new Oai_View_Helper_ListMetaDataFormats();
+ $listMetaDataFormats = new Oai_View_Helper_ListMetadataFormats();
$formatList = $listMetaDataFormats->listMetadataFormats();
$this->assertEquals($this->getExpectedMetadaFormatsWithoutOaiDc(), $listMetaDataFormats->listMetadataFormats());
}
@@ -202,7 +210,7 @@ public function testListMetadataFormatsAsAdminWithFormatNotVisibleAndAdminOnly()
],
]);
- $listMetaDataFormats = new Oai_View_Helper_ListMetaDataFormats();
+ $listMetaDataFormats = new Oai_View_Helper_ListMetadataFormats();
$this->assertEquals($this->getExpectedMetadaFormatsWithoutOaiDc(), $listMetaDataFormats->listMetadataFormats());
}
@@ -222,7 +230,7 @@ public function testListMetadataFormatsAsAdminWithFormatVisible()
],
]);
- $listMetaDataFormats = new Oai_View_Helper_ListMetaDataFormats();
+ $listMetaDataFormats = new Oai_View_Helper_ListMetadataFormats();
$this->assertEquals($this->getExpectedMetadaFormats(), $listMetaDataFormats->listMetadataFormats());
}
@@ -242,7 +250,7 @@ public function testListMetadataFormatsAsAdminWithFormatVisibleAndAdminOnly()
],
]);
- $listMetaDataFormats = new Oai_View_Helper_ListMetaDataFormats();
+ $listMetaDataFormats = new Oai_View_Helper_ListMetadataFormats();
$this->assertEquals($this->getExpectedMetadaFormats(), $listMetaDataFormats->listMetadataFormats());
}
}