From bcfa567428ee5bb95cca08200d782e8f6c4fcde8 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 13 Feb 2015 14:19:53 -0500 Subject: [PATCH] Added test coverage of new feature. --- .../unit-tests/src/VuFindTest/ExportTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ExportTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ExportTest.php index 6726ecea62d..b7fd74d8e93 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ExportTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ExportTest.php @@ -225,6 +225,24 @@ class ExportTest extends \PHPUnit_Framework_TestCase ); } + /** + * Test getLabelForFormat + * + * @ return void + */ + public function testGetLabel() + { + $config = [ + 'foo' => [], + 'bar' => ['label' => 'baz'], + ]; + $export = $this->getExport(array(), $config); + // test "use section label as default" + $this->assertEquals('foo', $export->getLabelForFormat('foo')); + // test "override with label setting" + $this->assertEquals('baz', $export->getLabelForFormat('bar')); + } + /** * Get a fake MARCXML record * -- GitLab