From caf31dd2da291b6f4c739fd443b474fe7170339e Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 9 Mar 2015 14:41:42 -0400 Subject: [PATCH] Standardized style for @expectedException. --- .../unit-tests/src/VuFindTest/Auth/ChoiceAuthTest.php | 3 +++ .../src/VuFindTest/Auth/DatabaseUnitTest.php | 6 ++++++ .../unit-tests/src/VuFindTest/Auth/ManagerTest.php | 4 ++++ .../src/VuFindTest/Auth/PluginManagerTest.php | 1 + .../src/VuFindTest/Autocomplete/PluginManagerTest.php | 1 + .../src/VuFindTest/Autocomplete/TagTest.php | 1 + .../Content/AuthorNotes/PluginManagerTest.php | 1 + .../VuFindTest/Content/Covers/PluginManagerTest.php | 1 + .../VuFindTest/Content/Excerpts/PluginManagerTest.php | 1 + .../src/VuFindTest/Content/PluginManagerTest.php | 1 + .../VuFindTest/Content/Reviews/PluginManagerTest.php | 1 + .../unit-tests/src/VuFindTest/Cover/LoaderTest.php | 1 + .../src/VuFindTest/Db/Table/PluginManagerTest.php | 1 + .../unit-tests/src/VuFindTest/Harvester/OAITest.php | 2 ++ .../VuFindTest/Hierarchy/Driver/PluginManagerTest.php | 1 + .../Hierarchy/TreeDataSource/PluginManagerTest.php | 1 + .../Hierarchy/TreeRenderer/PluginManagerTest.php | 1 + .../I18n/Translator/Loader/ExtendedIniTest.php | 1 + .../src/VuFindTest/ILS/Driver/PluginManagerTest.php | 1 + .../unit-tests/src/VuFindTest/Mailer/MailerTest.php | 5 +++++ .../unit-tests/src/VuFindTest/QRCode/LoaderTest.php | 1 + .../src/VuFindTest/Recommend/PluginManagerTest.php | 1 + .../src/VuFindTest/Recommend/SideFacetsTest.php | 1 + .../unit-tests/src/VuFindTest/Record/LoaderTest.php | 1 + .../src/VuFindTest/RecordDriver/PluginManagerTest.php | 1 + .../src/VuFindTest/RecordTab/PluginManagerTest.php | 1 + .../src/VuFindTest/Related/PluginManagerTest.php | 1 + .../src/VuFindTest/Reserves/CsvReaderTest.php | 1 + .../VuFindTest/Resolver/Driver/PluginManagerTest.php | 1 + .../Role/PermissionProvider/PluginManagerTest.php | 1 + .../unit-tests/src/VuFindTest/SMS/ClickatellTest.php | 3 +++ .../src/VuFindTest/Search/BackendManagerTest.php | 8 ++++---- .../VuFindTest/Search/Options/PluginManagerTest.php | 1 + .../VuFindTest/Search/Params/PluginManagerTest.php | 1 + .../VuFindTest/Search/Results/PluginManagerTest.php | 1 + .../VuFindTest/Search/Solr/SpellingProcessorTest.php | 1 + .../src/VuFindTest/Session/PluginManagerTest.php | 1 + .../Statistics/Driver/PluginManagerTest.php | 1 + .../src/VuFindTest/View/Helper/Root/RecordTest.php | 2 ++ .../EDS/Response/RecordCollectionFactoryTest.php | 6 ++++-- .../EIT/Response/XML/RecordCollectionFactoryTest.php | 4 +++- .../src/VuFindTest/Backend/LibGuides/BackendTest.php | 2 ++ .../VuFindTest/Backend/LibGuides/QueryBuilderTest.php | 1 + .../Response/RecordCollectionFactoryTest.php | 1 + .../src/VuFindTest/Backend/Primo/BackendTest.php | 2 ++ .../src/VuFindTest/Backend/Primo/ConnectorTest.php | 1 + .../Primo/Response/RecordCollectionFactoryTest.php | 4 +++- .../src/VuFindTest/Backend/Solr/BackendTest.php | 3 +++ .../src/VuFindTest/Backend/Solr/ConnectorTest.php | 8 ++++++++ .../Response/Json/RecordCollectionFactoryTest.php | 1 + .../src/VuFindTest/Backend/Summon/BackendTest.php | 2 ++ .../Summon/Response/RecordCollectionFactoryTest.php | 6 ++++-- .../src/VuFindTest/Backend/WorldCat/ConnectorTest.php | 1 + .../Response/XML/RecordCollectionFactoryTest.php | 2 ++ .../src/VuFindTest/Query/QueryGroupTest.php | 1 + .../unit-tests/src/VuFindTest/SearchServiceTest.php | 11 +++++++++++ .../tests/unit-tests/src/VuFindTest/ThemeInfoTest.php | 1 + 57 files changed, 111 insertions(+), 10 deletions(-) diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ChoiceAuthTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ChoiceAuthTest.php index 35507d0a140..2e1befc3650 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ChoiceAuthTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ChoiceAuthTest.php @@ -45,6 +45,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase * Test config validation * * @return void + * * @expectedException \VuFind\Exception\Auth * @expectedExceptionMessage One or more ChoiceAuth parameters are missing. */ @@ -58,6 +59,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase * Test default getPluginManager behavior * * @return void + * * @expectedException \Exception * @expectedExceptionMessage Plugin manager missing. */ @@ -174,6 +176,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase * Test an illegal auth method * * @return void + * * @expectedException \Exception * @expectedExceptionMessage Illegal setting: foo */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php index 113d1a0b89b..634b239618f 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php @@ -43,6 +43,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test validation of empty create request. * * @return void + * * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage Username cannot be blank */ @@ -56,6 +57,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test validation of create request w/blank password. * * @return void + * * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage Password cannot be blank */ @@ -71,6 +73,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test validation of create request w/mismatched passwords. * * @return void + * * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage Passwords do not match */ @@ -86,6 +89,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test missing table manager. * * @return void + * * @expectedException Exception * @expectedExceptionMessage DB table manager missing. */ @@ -99,6 +103,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test creation w/duplicate email. * * @return void + * * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage That email address is already used */ @@ -124,6 +129,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test creation w/duplicate username. * * @return void + * * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage That username is already taken */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ManagerTest.php index 269c956f356..605e60b4656 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ManagerTest.php @@ -195,6 +195,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * Test security features of switching between auth options (part 2). * * @return void + * * @expectedException \Exception * @expectedExceptionMessage Illegal authentication method: MultiILS */ @@ -332,6 +333,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * Test unsuccessful login (\VuFind\Exception\PasswordSecurity) * * @return void + * * @expectedException \VuFind\Exception\PasswordSecurity * @expectedExceptionMessage Boom */ @@ -350,6 +352,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * Test unsuccessful login (\VuFind\Exception\Auth) * * @return void + * * @expectedException \VuFind\Exception\Auth * @expectedExceptionMessage Blam */ @@ -368,6 +371,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * Test that unexpected exceptions get mapped to technical errors. * * @return void + * * @expectedException \VuFind\Exception\Auth * @expectedExceptionMessage authentication_error_technical */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/PluginManagerTest.php index 882b77f33ff..5e713e201f7 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Auth\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/PluginManagerTest.php index 5fc05ce7145..d50e417cd54 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Autocomplete\AutocompleteInterface */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php index 887a8e8faf2..34d71f2b346 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php @@ -43,6 +43,7 @@ class TagTest extends \VuFindTest\Unit\DbTestCase * Test that missing plugin manager causes exception. * * @return void + * * @expectedException Exception * @expectedExceptionMessage DB table manager missing. */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/AuthorNotes/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/AuthorNotes/PluginManagerTest.php index e9eeb373641..e04eddd576e 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/AuthorNotes/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/AuthorNotes/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/PluginManagerTest.php index 7dd4b2a4e4e..0ecd0db4e03 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractCover */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Excerpts/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Excerpts/PluginManagerTest.php index 53d652434fb..06584f951bf 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Excerpts/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Excerpts/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/PluginManagerTest.php index 2fee991c379..d69ef24be53 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\Loader */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Reviews/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Reviews/PluginManagerTest.php index 1cb4294d5ce..8c091757d09 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Reviews/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Reviews/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php index 61dcb4186f5..0564f621385 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php @@ -53,6 +53,7 @@ class LoaderTest extends \VuFindTest\Unit\TestCase * Test that failure to load even the baseline image causes an exception. * * @return void + * * @expectedException Exception * @expectedExceptionMessage Could not load default fail image. */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Db/Table/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Db/Table/PluginManagerTest.php index 646ef7e3b33..e52e2024201 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Db/Table/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Db/Table/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Db\Table\Gateway */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Harvester/OAITest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Harvester/OAITest.php index c3284103ce2..4c8a2f80c8f 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Harvester/OAITest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Harvester/OAITest.php @@ -227,6 +227,7 @@ class OAITest extends \VuFindTest\Unit\TestCase * Test HTTP error detection. * * @return void + * * @expectedException Exception * @expectedExceptionMessage HTTP Error */ @@ -250,6 +251,7 @@ class OAITest extends \VuFindTest\Unit\TestCase * Test that a missing URL throws an exception. * * @return void + * * @expectedException Exception * @expectedExceptionMessage Missing base URL for test. */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/Driver/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/Driver/PluginManagerTest.php index f52ed5e3443..9f25152fdf8 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/Driver/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/Driver/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\Driver\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/TreeDataSource/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/TreeDataSource/PluginManagerTest.php index 2208cf93110..81a869accea 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/TreeDataSource/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/TreeDataSource/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\TreeDataSource\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/TreeRenderer/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/TreeRenderer/PluginManagerTest.php index 09999d00666..8ee9d2a4356 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/TreeRenderer/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Hierarchy/TreeRenderer/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\TreeRenderer\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/I18n/Translator/Loader/ExtendedIniTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/I18n/Translator/Loader/ExtendedIniTest.php index faf05c3e65c..9afec31252f 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/I18n/Translator/Loader/ExtendedIniTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/I18n/Translator/Loader/ExtendedIniTest.php @@ -156,6 +156,7 @@ class ExtendedIniTest extends \VuFindTest\Unit\TestCase * Test missing path stack. * * @return void + * * @expectedException Zend\I18n\Exception\InvalidArgumentException * @expectedExceptionMessage Ini file 'en.ini' not found */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PluginManagerTest.php index 685254d3787..6a14d84f459 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\ILS\Driver\DriverInterface */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php index 0da2c3a1b49..772f009adde 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php @@ -62,6 +62,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test bad to address. * * @return void + * * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Invalid Recipient Email Address */ @@ -76,6 +77,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test empty to address. * * @return void + * * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Invalid Recipient Email Address */ @@ -90,6 +92,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test that we only accept one recipient by default * * @return void + * * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Too Many Email Recipients */ @@ -104,6 +107,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test bad from address. * * @return void + * * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Invalid Sender Email Address */ @@ -118,6 +122,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test transport exception. * * @return void + * * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Boom */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php index 363b9acdf50..e8c846ff292 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php @@ -52,6 +52,7 @@ class LoaderTest extends \VuFindTest\Unit\TestCase * Test that failure to load even the baseline image causes an exception. * * @return void + * * @expectedException Exception * @expectedExceptionMessage Could not load default fail image. */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/PluginManagerTest.php index 79a1a44858f..7a031823ffc 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Recommend\RecommendInterface */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php index 7947e3e32ba..231ff2a6f47 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php @@ -75,6 +75,7 @@ class SideFacetsTest extends \VuFindTest\Unit\TestCase * Test missing hierarchical facet helper * * @return void + * * @expectedException Exception * @expectedExceptionMessage VuFind\Recommend\SideFacets: hierarchical facet helper unavailable */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php index 07e78f67dd5..3478a91304d 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php @@ -50,6 +50,7 @@ class LoaderTest extends TestCase * Test exception for missing record. * * @return void + * * @expectedException VuFind\Exception\RecordMissing * @expectedExceptionMessage Record VuFind:test does not exist. */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/PluginManagerTest.php index 0e71fd8daa7..c8a840fc4c1 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\RecordDriver\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/PluginManagerTest.php index 8a4c85b1911..f578c59e424 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\RecordTab\TabInterface */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/PluginManagerTest.php index 1fd4b3e34ff..ed598804f01 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Related\RelatedInterface */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Reserves/CsvReaderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Reserves/CsvReaderTest.php index c2f46aa1ead..ce9640c5def 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Reserves/CsvReaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Reserves/CsvReaderTest.php @@ -135,6 +135,7 @@ class CsvReaderTest extends \VuFindTest\Unit\TestCase * Test loading an empty file. * * @return void + * * @expectedException \Exception * @expectedExceptionMessage Could not find valid data. Details: */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Resolver/Driver/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Resolver/Driver/PluginManagerTest.php index 16ce53ad9d7..23659e16dfb 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Resolver/Driver/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Resolver/Driver/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Resolver\Driver\DriverInterface */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/PluginManagerTest.php index 7c5a2c16d64..093633390d4 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Role\PermissionProvider\PermissionProviderInterface */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php index 524fdb5e9d6..d2dfe5a17c1 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php @@ -91,6 +91,7 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase * Test unexpected response * * @return void + * * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage badbadbad */ @@ -112,6 +113,7 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase * Test unsuccessful query * * @return void + * * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Problem sending text. */ @@ -132,6 +134,7 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase * Test an exception in the mail client * * @return void + * * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Foo */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/BackendManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/BackendManagerTest.php index e2dfa34a853..ad34a6d0837 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/BackendManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/BackendManagerTest.php @@ -47,10 +47,10 @@ class BackendManagerTest extends TestCase /** * Test that get() throws on a non-object. * + * @return void + * * @expectedException UnexpectedValueException * @expectedExceptionMessage Expected backend registry to return object - * - * @return void */ public function testGetThrowsOnNonObject() { @@ -65,10 +65,10 @@ class BackendManagerTest extends TestCase /** * Test that get() throws on a non-backend. * + * @return void + * * @expectedException UnexpectedValueException * @expectedExceptionMessage does not implement the expected interface - * - * @return void */ public function testGetThrowsOnNonBackend() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Options/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Options/PluginManagerTest.php index 1be1d05a6e0..e2885ff0446 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Options/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Options/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Search\Base\Options */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Params/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Params/PluginManagerTest.php index 58430033f88..24386016d94 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Params/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Params/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Search\Base\Params */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Results/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Results/PluginManagerTest.php index b606e953b06..cfafe8d6baf 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Results/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Results/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Search\Base\Results */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/SpellingProcessorTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/SpellingProcessorTest.php index 8100669944a..d584e3cdefa 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/SpellingProcessorTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/SpellingProcessorTest.php @@ -403,6 +403,7 @@ class SpellingProcessorTest extends TestCase * Test detection of bad Solr response format. * * @return void + * * @expectedException \Exception * @expectedExceptionMessage Unexpected suggestion format; spellcheck.extendedResults must be set to true. */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/PluginManagerTest.php index fe1467c230c..5bb81dade21 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to Zend\Session\SaveHandler\SaveHandlerInterface */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Statistics/Driver/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Statistics/Driver/PluginManagerTest.php index c5ec8947d21..582311a5c62 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Statistics/Driver/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Statistics/Driver/PluginManagerTest.php @@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void + * * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Statistics\Driver\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php index 0ab826e016b..0139536e006 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php @@ -43,6 +43,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase * Test attempting to display a template that does not exist. * * @return void + * * @expectedException Zend\View\Exception\RuntimeException * @expectedExceptionMessage Cannot find core.phtml template for record driver: VuFind\RecordDriver\SolrMarc */ @@ -449,6 +450,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase * Test getLinkDetails with invalid details * * @return void + * * @expectedException Exception * @expectedExceptionMessage Invalid URL array. */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/Response/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/Response/RecordCollectionFactoryTest.php index 1ad5b45b588..b43e63d4ebe 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/Response/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/Response/RecordCollectionFactoryTest.php @@ -45,9 +45,10 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase /** * Test constructor exceptions. * + * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. - * @return void */ public function testConstructorRequiresFactoryFunction() { @@ -57,9 +58,10 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase /** * Test constructor exceptions. * + * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string - * @return void */ public function testFactoryRequiresArray() { diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/Response/XML/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/Response/XML/RecordCollectionFactoryTest.php index 0a35b5b0223..93f8861dc60 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/Response/XML/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/Response/XML/RecordCollectionFactoryTest.php @@ -45,9 +45,10 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase /** * Test constructor exception. * + * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. - * @return void */ public function testConstructorRequiresValidFactoryFunction() { @@ -58,6 +59,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * Test invalid input. * * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/BackendTest.php index bec7138c4e9..2466e8075e0 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/BackendTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/BackendTest.php @@ -53,6 +53,7 @@ class BackendTest extends \VuFindTest\Unit\TestCase * Test retrieving a record (not supported). * * @return void + * * @expectedException \Exception * @expectedExceptionMessage retrieve() not supported by LibGuides. */ @@ -142,6 +143,7 @@ class BackendTest extends \VuFindTest\Unit\TestCase * Test search exception handling. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException */ public function testSearchWrapsLibGuidesException() diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/QueryBuilderTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/QueryBuilderTest.php index 5f0f660de94..9c4ba456e0f 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/QueryBuilderTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/QueryBuilderTest.php @@ -62,6 +62,7 @@ class QueryBuilderTest extends PHPUnit_Framework_TestCase * Test advanced query parsing (not currently supported) * * @return void + * * @expectedException \Exception * @expectedExceptionMessage Advanced search not supported. */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/Response/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/Response/RecordCollectionFactoryTest.php index 2c313e69790..8d8bf8c395f 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/Response/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/Response/RecordCollectionFactoryTest.php @@ -59,6 +59,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * Test invalid input. * * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/BackendTest.php index c6aa10e9ff0..4aa672c98bf 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/BackendTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/BackendTest.php @@ -132,6 +132,7 @@ class BackendTest extends \VuFindTest\Unit\TestCase * Test search exception handling. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException */ public function testSearchWrapsPrimoException() @@ -148,6 +149,7 @@ class BackendTest extends \VuFindTest\Unit\TestCase * Test retrieve exception handling. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException */ public function testRetrieveWrapsPrimoException() diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/ConnectorTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/ConnectorTest.php index f0318683ed0..316ca772b5d 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/ConnectorTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/ConnectorTest.php @@ -124,6 +124,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * status. * * @return void + * * @expectedException \Exception * @expectedExceptionMessage Unauthorized access */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/Response/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/Response/RecordCollectionFactoryTest.php index fa4b94b7cf3..ef547f0995f 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/Response/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/Response/RecordCollectionFactoryTest.php @@ -45,9 +45,10 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase /** * Test constructor exception. * + * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. - * @return void */ public function testConstructorRequiresValidFactoryFunction() { @@ -58,6 +59,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * Test invalid input. * * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php index 89f7cb76d7f..229fc629efc 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php @@ -220,6 +220,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * Test refining an alphabrowse exception (string 1). * * @return void + * * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException * @expectedExceptionMessage Alphabetic Browse index missing. */ @@ -232,6 +233,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * Test refining an alphabrowse exception (string 2). * * @return void + * * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException * @expectedExceptionMessage Alphabetic Browse index missing. */ @@ -244,6 +246,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * Test that we don't refine a non-alphabrowse-related exception. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException * @expectedExceptionMessage not a browse error */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php index 6e8b832ecbb..07e989a8f79 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php @@ -84,6 +84,8 @@ class ConnectorTest extends PHPUnit_Framework_TestCase /** * Test RemoteErrorException is thrown on a remote 5xx error. * + * @return void + * * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException * @expectedExceptionCode 500 */ @@ -96,6 +98,8 @@ class ConnectorTest extends PHPUnit_Framework_TestCase /** * Test RequestErrorException is thrown on a remote 4xx error. * + * @return void + * * @expectedException VuFindSearch\Backend\Exception\RequestErrorException * @expectedExceptionCode 400 */ @@ -108,6 +112,8 @@ class ConnectorTest extends PHPUnit_Framework_TestCase /** * Test InvalidArgumentException invalid adapter object. * + * @return void + * * @expectedException InvalidArgumentException * @expectedExceptionMessage AdapterInterface */ @@ -120,6 +126,8 @@ class ConnectorTest extends PHPUnit_Framework_TestCase /** * Test InvalidArgumentException unknown serialization format. * + * @return void + * * @expectedException InvalidArgumentException * @expectedExceptionMessage Unable to serialize */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionFactoryTest.php index 9fb24f03b87..79b67b0b473 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionFactoryTest.php @@ -59,6 +59,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * Test invalid input. * * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/BackendTest.php index bac4d299d2a..10b0e0a3177 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/BackendTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/BackendTest.php @@ -120,6 +120,7 @@ class BackendTest extends TestCase * Test retrieve exception handling. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException */ public function testRetrieveWrapsSummonException() @@ -171,6 +172,7 @@ class BackendTest extends TestCase * Test search exception handling. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException */ public function testSearchWrapsSummonException() diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/Response/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/Response/RecordCollectionFactoryTest.php index c58956ea404..36c64088628 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/Response/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/Response/RecordCollectionFactoryTest.php @@ -45,9 +45,10 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase /** * Test constructor exceptions. * + * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. - * @return void */ public function testConstructorRequiresFactoryFunction() { @@ -57,9 +58,10 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase /** * Test constructor exceptions. * + * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string - * @return void */ public function testFactoryRequiresArray() { diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/ConnectorTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/ConnectorTest.php index 205f6e762b6..53e49ae053f 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/ConnectorTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/ConnectorTest.php @@ -72,6 +72,7 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase * Test "get holdings" HTTP failure * * @return void + * * @expectedException VuFindSearch\Backend\Exception\RequestErrorException */ public function testGetHoldingsHttpFailure() diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/Response/XML/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/Response/XML/RecordCollectionFactoryTest.php index 04b926ae57c..3a800e995d1 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/Response/XML/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/Response/XML/RecordCollectionFactoryTest.php @@ -45,6 +45,7 @@ class RecordCollectionFactoryTest extends \PHPUnit_Framework_TestCase * Test bad callback. * * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. */ @@ -57,6 +58,7 @@ class RecordCollectionFactoryTest extends \PHPUnit_Framework_TestCase * Test bad factory input. * * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Query/QueryGroupTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Query/QueryGroupTest.php index 87ccae852b1..0d591f7c1bd 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Query/QueryGroupTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Query/QueryGroupTest.php @@ -122,6 +122,7 @@ class QueryGroupTest extends PHPUnit_Framework_TestCase * Test setting an invalid operator. * * @return void + * * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unknown or invalid boolean operator: fizz */ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php index 678eaf76a90..ace86cb05bb 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php @@ -84,6 +84,7 @@ class SearchServiceTest extends TestCase * Test exception-throwing retrieve action. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ @@ -108,6 +109,7 @@ class SearchServiceTest extends TestCase * Test exception-throwing search action. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ @@ -189,6 +191,7 @@ class SearchServiceTest extends TestCase * Test exception-throwing batch retrieve action (with RetrieveBatchInterface). * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ @@ -221,6 +224,7 @@ class SearchServiceTest extends TestCase * RetrieveBatchInterface). * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ @@ -279,6 +283,7 @@ class SearchServiceTest extends TestCase * Test random (with RandomInterface) exception. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ @@ -449,6 +454,7 @@ class SearchServiceTest extends TestCase * Test random (without RandomInterface) exception. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ @@ -475,6 +481,7 @@ class SearchServiceTest extends TestCase * Test random (without RandomInterface) exception at item retrieval search. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ @@ -517,6 +524,7 @@ class SearchServiceTest extends TestCase * Test random (without RandomInterface) exception with less results than limit. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ @@ -589,6 +597,7 @@ class SearchServiceTest extends TestCase * Test similar action on bad backend. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage foo does not support similar() */ @@ -603,6 +612,7 @@ class SearchServiceTest extends TestCase * Test exception-throwing similar action. * * @return void + * * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ @@ -633,6 +643,7 @@ class SearchServiceTest extends TestCase * Test a failure to resolve. * * @return void + * * @expectedException VuFindSearch\Exception\RuntimeException * @expectedExceptionMessage Unable to resolve backend: retrieve, junk */ diff --git a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php index b5780ae9c76..73ddb0a16d7 100644 --- a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php +++ b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php @@ -81,6 +81,7 @@ class ThemeInfoTest extends Unit\TestCase * Test setting invalid theme * * @return void + * * @expectedException Exception * @expectedExceptionMessage Cannot load theme: invalid */ -- GitLab