From eb40c170318977940e0129f0cc7d8816fd0ef96d Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Wed, 26 Feb 2020 09:57:10 -0500 Subject: [PATCH] Run phpcbf on tests (style cleanup). --- .../src/VuFindTest/Auth/DatabaseTest.php | 10 - .../src/VuFindTest/Auth/ILSTest.php | 7 - .../src/VuFindTest/Auth/ShibbolethTest.php | 5 - .../src/VuFindTest/Mink/AccountMenuTest.php | 6 +- .../VuFindTest/Mink/CallnumberBrowseTest.php | 24 +- .../src/VuFindTest/Mink/CartTest.php | 44 +- .../src/VuFindTest/Mink/CollectionsTest.php | 18 +- .../src/VuFindTest/Mink/SavedSearchesTest.php | 2 +- .../src/VuFindTest/Auth/ChoiceAuthTest.php | 3 - .../src/VuFindTest/Auth/DatabaseUnitTest.php | 6 - .../VuFindTest/Auth/ILSAuthenticatorTest.php | 2 - .../src/VuFindTest/Auth/LDAPTest.php | 6 - .../src/VuFindTest/Auth/ManagerTest.php | 4 - .../src/VuFindTest/Auth/MultiAuthTest.php | 5 - .../src/VuFindTest/Auth/PluginManagerTest.php | 1 - .../src/VuFindTest/Auth/SIP2Test.php | 2 - .../Autocomplete/PluginManagerTest.php | 1 - .../src/VuFindTest/Autocomplete/TagTest.php | 1 - .../unit-tests/src/VuFindTest/CartTest.php | 6 +- .../VuFindTest/Config/PluginFactoryTest.php | 1 - .../src/VuFindTest/Config/VersionTest.php | 1 - .../Content/AuthorNotes/PluginManagerTest.php | 1 - .../Content/Covers/PluginManagerTest.php | 1 - .../Content/Excerpts/PluginManagerTest.php | 1 - .../VuFindTest/Content/PluginManagerTest.php | 1 - .../Content/Reviews/PluginManagerTest.php | 1 - .../Controller/Plugin/ResultScrollerTest.php | 12 +- .../src/VuFindTest/Cover/LoaderTest.php | 11 +- .../VuFindTest/Db/Table/PluginManagerTest.php | 1 - .../src/VuFindTest/Db/Table/UserListTest.php | 1 - .../VuFindTest/DoiLinker/UnpaywallTest.php | 10 +- .../src/VuFindTest/Form/FormTest.php | 1 - .../Hierarchy/Driver/PluginManagerTest.php | 1 - .../TreeDataSource/PluginManagerTest.php | 1 - .../TreeRenderer/PluginManagerTest.php | 1 - .../Translator/Loader/ExtendedIniTest.php | 1 - .../ILS/Driver/MultiBackendTest.php | 9 +- .../src/VuFindTest/ILS/Driver/PAIATest.php | 22 +- .../ILS/Driver/PluginManagerTest.php | 1 - .../src/VuFindTest/Mailer/MailerTest.php | 7 - .../src/VuFindTest/QRCode/LoaderTest.php | 1 - .../Recommend/PluginManagerTest.php | 1 - .../VuFindTest/Recommend/SideFacetsTest.php | 1 - .../src/VuFindTest/Record/LoaderTest.php | 5 +- .../RecordDriver/PluginManagerTest.php | 1 - .../RecordTab/PluginManagerTest.php | 1 - .../VuFindTest/RecordTab/TabManagerTest.php | 4 +- .../VuFindTest/Related/PluginManagerTest.php | 1 - .../src/VuFindTest/Reserves/CsvReaderTest.php | 1 - .../Resolver/Driver/PluginManagerTest.php | 1 - .../PermissionProvider/PluginManagerTest.php | 1 - .../Role/PermissionProvider/UserTest.php | 4 +- .../src/VuFindTest/SMS/ClickatellTest.php | 3 - .../VuFindTest/Search/BackendManagerTest.php | 2 - .../Search/Options/PluginManagerTest.php | 1 - .../Search/Params/PluginManagerTest.php | 1 - .../Primo/PrimoPermissionHandlerTest.php | 393 ++++++++++++------ .../Search/Results/PluginManagerTest.php | 1 - .../Search/Solr/SpellingProcessorTest.php | 1 - .../VuFindTest/Session/PluginManagerTest.php | 1 - .../VuFindTest/UrlShortener/DatabaseTest.php | 1 - .../src/VuFindTest/UrlShortener/NoneTest.php | 1 - .../View/Helper/Root/PermissionTest.php | 13 +- .../View/Helper/Root/RecordTest.php | 2 - .../View/Helper/Root/TranslateTest.php | 68 +-- .../Backend/BrowZine/BackendTest.php | 1 - .../Backend/BrowZine/QueryBuilderTest.php | 1 - .../Response/RecordCollectionFactoryTest.php | 1 - .../Response/RecordCollectionFactoryTest.php | 2 - .../XML/RecordCollectionFactoryTest.php | 2 - .../Backend/LibGuides/BackendTest.php | 2 - .../Backend/LibGuides/QueryBuilderTest.php | 1 - .../Response/RecordCollectionFactoryTest.php | 1 - .../VuFindTest/Backend/Primo/BackendTest.php | 2 - .../Backend/Primo/ConnectorTest.php | 1 - .../Response/RecordCollectionFactoryTest.php | 2 - .../VuFindTest/Backend/Solr/BackendTest.php | 6 - .../VuFindTest/Backend/Solr/ConnectorTest.php | 4 - .../Backend/Solr/HandlerMapTest.php | 5 - .../Json/RecordCollectionFactoryTest.php | 1 - .../VuFindTest/Backend/Summon/BackendTest.php | 2 - .../Response/RecordCollectionFactoryTest.php | 2 - .../Backend/WorldCat/ConnectorTest.php | 1 - .../XML/RecordCollectionFactoryTest.php | 2 - .../src/VuFindTest/Query/QueryGroupTest.php | 1 - .../src/VuFindTest/SearchServiceTest.php | 13 - .../src/VuFindTest/ThemeInfoTest.php | 1 - 87 files changed, 423 insertions(+), 380 deletions(-) diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/DatabaseTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/DatabaseTest.php index 02004a41bee..a8af9f56596 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/DatabaseTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/DatabaseTest.php @@ -137,7 +137,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test blank username. * * @return void - * */ public function testCreationWithBlankUsername() { @@ -151,7 +150,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test blank password. * * @return void - * */ public function testCreationWithBlankPassword() { @@ -165,7 +163,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test password mismatch. * * @return void - * */ public function testCreationWithPasswordMismatch() { @@ -179,7 +176,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test invalid email. * * @return void - * */ public function testCreationWithInvalidEmail() { @@ -210,7 +206,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test duplicate username. * * @return void - * */ public function testCreationWithDuplicateUsername() { @@ -224,7 +219,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test duplicate email. * * @return void - * */ public function testCreationWithDuplicateEmail() { @@ -238,7 +232,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test login with blank username. * * @return void - * */ public function testLoginWithBlankUsername() { @@ -252,7 +245,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test login with blank password. * * @return void - * */ public function testLoginWithBlankPassword() { @@ -266,7 +258,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test login with unknown username. * * @return void - * */ public function testLoginWithUnrecognizedUsername() { @@ -280,7 +271,6 @@ class DatabaseTest extends \VuFindTest\Unit\DbTestCase * Test login with bad password. * * @return void - * */ public function testLoginWithBadPassword() { diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php index acc429c582b..c24b8a5f4ef 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php @@ -152,7 +152,6 @@ class ILSTest extends \VuFindTest\Unit\DbTestCase * Test login with blank username. * * @return void - * */ public function testLoginWithBlankUsername() { @@ -166,7 +165,6 @@ class ILSTest extends \VuFindTest\Unit\DbTestCase * Test login with blank password. * * @return void - * */ public function testLoginWithBlankPassword() { @@ -180,7 +178,6 @@ class ILSTest extends \VuFindTest\Unit\DbTestCase * Test login with technical error. * * @return void - * */ public function testBadLoginResponse() { @@ -220,7 +217,6 @@ class ILSTest extends \VuFindTest\Unit\DbTestCase * Test failure caused by missing cat_id. * * @return void - * */ public function testLoginWithMissingCatId() { @@ -247,7 +243,6 @@ class ILSTest extends \VuFindTest\Unit\DbTestCase * Test updating a user's password with mismatched new password values. * * @return void - * */ public function testUpdateUserPasswordWithEmptyValue() { @@ -269,7 +264,6 @@ class ILSTest extends \VuFindTest\Unit\DbTestCase * Test updating a user's password with mismatched new password values. * * @return void - * */ public function testUpdateUserPasswordWithoutLoggedInUser() { @@ -290,7 +284,6 @@ class ILSTest extends \VuFindTest\Unit\DbTestCase * Test updating a user's password with mismatched new password values. * * @return void - * */ public function testUpdateUserPasswordWithMismatch() { diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php index 4affd469b96..6172fbbe318 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php @@ -138,7 +138,6 @@ class ShibbolethTest extends \VuFindTest\Unit\DbTestCase * Test login with blank username. * * @return void - * */ public function testLoginWithBlankUsername() { @@ -152,7 +151,6 @@ class ShibbolethTest extends \VuFindTest\Unit\DbTestCase * Test login with blank username. * * @return void - * */ public function testLoginWithBlankPassword() { @@ -166,7 +164,6 @@ class ShibbolethTest extends \VuFindTest\Unit\DbTestCase * Test a configuration with a missing attribute value. * * @return void - * */ public function testWithMissingAttributeValue() { @@ -181,7 +178,6 @@ class ShibbolethTest extends \VuFindTest\Unit\DbTestCase * Test a configuration with missing username. * * @return void - * */ public function testWithoutUsername() { @@ -196,7 +192,6 @@ class ShibbolethTest extends \VuFindTest\Unit\DbTestCase * Test a configuration with missing login setting. * * @return void - * */ public function testWithoutLoginSetting() { diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AccountMenuTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AccountMenuTest.php index f2a727cda80..8533ea8257b 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AccountMenuTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AccountMenuTest.php @@ -66,7 +66,8 @@ class AccountMenuTest extends \VuFindTest\Unit\MinkTestCase return; } // Setup config - $this->changeConfigs([ + $this->changeConfigs( + [ 'Demo' => $this->getDemoIniOverrides(), 'config' => [ 'Catalog' => ['driver' => 'Demo'], @@ -75,7 +76,8 @@ class AccountMenuTest extends \VuFindTest\Unit\MinkTestCase 'enableDropdown' => false ] ] - ]); + ] + ); } /** diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CallnumberBrowseTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CallnumberBrowseTest.php index 5dc9de0a2e0..86477973cd4 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CallnumberBrowseTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CallnumberBrowseTest.php @@ -107,21 +107,25 @@ class CallnumberBrowseTest extends \VuFindTest\Unit\MinkTestCase protected function setupMultipleCallnumbers() { - $this->changeConfigs([ + $this->changeConfigs( + [ 'config' => [ 'Catalog' => ['driver' => 'Demo'] ], 'Demo' => [ 'Holdings' => [ - $this->id => json_encode([ + $this->id => json_encode( + [ ['callnumber' => 'CallNumberOne', 'location' => 'Villanova'], ['callnumber' => 'CallNumberTwo', 'location' => 'Villanova'], ['callnumber' => 'CallNumberThree', 'location' => 'Phobos'], ['callnumber' => 'CallNumberFour', 'location' => 'Phobos'] - ]) + ] + ) ] ] - ]); + ] + ); } /** @@ -136,12 +140,14 @@ class CallnumberBrowseTest extends \VuFindTest\Unit\MinkTestCase protected function activateAndTestLinks($type, $page, $expectLinks) { // Single callnumbers (Sample) - $this->changeConfigs([ + $this->changeConfigs( + [ 'config' => [ 'Catalog' => ['driver' => 'Sample'], 'Item_Status' => ['callnumber_handler' => $type] ] - ]); + ] + ); $this->getMinkSession()->reload(); $this->snooze(); $link = $page->find('css', '.callnumber a,.groupCallnumber a,.fullCallnumber a'); @@ -189,9 +195,11 @@ class CallnumberBrowseTest extends \VuFindTest\Unit\MinkTestCase */ public function testFirstAndMsg() { - $this->changeConfigs([ + $this->changeConfigs( + [ 'config' => ['Item_Status' => ['show_full_status' => false]] - ]); + ] + ); $this->validateSetting('first'); } diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CartTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CartTest.php index 0c4066a865e..af99ef7f13f 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CartTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CartTest.php @@ -160,7 +160,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase * Add the current page of results to the cart (using the individual add * buttons). * - * @param Element $page Page element + * @param Element $page Page element * * @return void */ @@ -761,41 +761,55 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase public function testToolbarVisibilityConfigCombinations() { $page = $this->getSearchResultsPage(); - $elements = $this->runConfigCombo($page, [ + $elements = $this->runConfigCombo( + $page, [ 'showBookBag' => true, 'showBulkOptions' => false, 'bookbagTogglesInSearch' => false, - ]); - $elements = $this->runConfigCombo($page, [ + ] + ); + $elements = $this->runConfigCombo( + $page, [ 'showBookBag' => false, 'showBulkOptions' => false, 'bookbagTogglesInSearch' => true, - ]); - $elements = $this->runConfigCombo($page, [ + ] + ); + $elements = $this->runConfigCombo( + $page, [ 'showBookBag' => false, 'showBulkOptions' => true, 'bookbagTogglesInSearch' => false, - ]); - $elements = $this->runConfigCombo($page, [ + ] + ); + $elements = $this->runConfigCombo( + $page, [ 'showBookBag' => true, 'showBulkOptions' => false, 'bookbagTogglesInSearch' => true, - ]); - $elements = $this->runConfigCombo($page, [ + ] + ); + $elements = $this->runConfigCombo( + $page, [ 'showBookBag' => true, 'showBulkOptions' => true, 'bookbagTogglesInSearch' => false, - ]); - $elements = $this->runConfigCombo($page, [ + ] + ); + $elements = $this->runConfigCombo( + $page, [ 'showBookBag' => false, 'showBulkOptions' => true, 'bookbagTogglesInSearch' => true, - ]); - $elements = $this->runConfigCombo($page, [ + ] + ); + $elements = $this->runConfigCombo( + $page, [ 'showBookBag' => true, 'showBulkOptions' => true, 'bookbagTogglesInSearch' => true, - ]); + ] + ); } /** diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CollectionsTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CollectionsTest.php index 409d82aacf1..6e541e4a984 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CollectionsTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CollectionsTest.php @@ -75,7 +75,8 @@ class CollectionsTest extends \VuFindTest\Unit\MinkTestCase */ public function testBasic() { - $this->changeConfigs([ + $this->changeConfigs( + [ 'config' => [ 'Collections' => [ 'collections' => true @@ -86,7 +87,8 @@ class CollectionsTest extends \VuFindTest\Unit\MinkTestCase 'link_type' => 'Top' ] ] - ]); + ] + ); $page = $this->goToCollection(); $results = $page->findAll('css', '.result'); $this->assertEquals(7, count($results)); @@ -99,7 +101,8 @@ class CollectionsTest extends \VuFindTest\Unit\MinkTestCase */ public function testKeywordFilter() { - $this->changeConfigs([ + $this->changeConfigs( + [ 'config' => [ 'Collections' => [ 'collections' => true @@ -110,7 +113,8 @@ class CollectionsTest extends \VuFindTest\Unit\MinkTestCase 'link_type' => 'Top' ] ] - ]); + ] + ); $page = $this->goToCollection(); $input = $this->findCss($page, '#keywordFilter_lookfor'); $input->setValue('Subcollection 2'); @@ -129,7 +133,8 @@ class CollectionsTest extends \VuFindTest\Unit\MinkTestCase public function testContextLinks() { // link_type => 'All' - $this->changeConfigs([ + $this->changeConfigs( + [ 'config' => [ 'Hierarchy' => [ 'showTree' => true @@ -143,7 +148,8 @@ class CollectionsTest extends \VuFindTest\Unit\MinkTestCase 'link_type' => 'All' ] ] - ]); + ] + ); $page = $this->goToCollection(); $this->findCss($page, '.hierarchyTreeLink'); diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SavedSearchesTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SavedSearchesTest.php index e8c89ecc89d..43208f411c3 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SavedSearchesTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SavedSearchesTest.php @@ -144,7 +144,7 @@ class SavedSearchesTest extends \VuFindTest\Unit\MinkTestCase /** * Test that user A cannot delete user B's favorites. * - * @depends testSaveSearch + * @depends testSaveSearch * @retryCallback removeUsername2 * * @return void 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 74708d2df3f..557daa3fb9c 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ChoiceAuthTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ChoiceAuthTest.php @@ -48,7 +48,6 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase * Test config validation * * @return void - * */ public function testBadConfiguration() { @@ -63,7 +62,6 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase * Test default getPluginManager behavior * * @return void - * */ public function testMissingPluginManager() { @@ -180,7 +178,6 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase * Test an illegal auth method * * @return void - * */ public function testIllegalMethod() { 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 8f82fb61dbc..2ad8163a007 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php @@ -46,7 +46,6 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test validation of empty create request. * * @return void - * */ public function testEmptyCreateRequest() { @@ -61,7 +60,6 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test validation of create request w/blank password. * * @return void - * */ public function testEmptyPasswordCreateRequest() { @@ -78,7 +76,6 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test validation of create request w/mismatched passwords. * * @return void - * */ public function testMismatchedPasswordCreateRequest() { @@ -95,7 +92,6 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test missing table manager. * * @return void - * */ public function testCreateWithMissingTableManager() { @@ -110,7 +106,6 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test creation w/duplicate email. * * @return void - * */ public function testCreateDuplicateEmail() { @@ -135,7 +130,6 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * Test creation w/duplicate username. * * @return void - * */ public function testCreateDuplicateUsername() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ILSAuthenticatorTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ILSAuthenticatorTest.php index 3f7cf1d80a6..6190a568b15 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ILSAuthenticatorTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ILSAuthenticatorTest.php @@ -82,7 +82,6 @@ class ILSAuthenticatorTest extends \VuFindTest\Unit\TestCase * Test new catalog login failure (caused by exception). * * @return void - * */ public function testNewCatalogFailureByException() { @@ -157,7 +156,6 @@ class ILSAuthenticatorTest extends \VuFindTest\Unit\TestCase * Test an exception during stored login attempt. * * @return void - * */ public function testExceptionDuringStoredLoginAttempt() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/LDAPTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/LDAPTest.php index 6d0ead39f37..13cdb68b0c9 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/LDAPTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/LDAPTest.php @@ -80,7 +80,6 @@ class LDAPTest extends \VuFindTest\Unit\DbTestCase * Verify that missing host causes failure. * * @return void - * */ public function testWithMissingHost() { @@ -95,7 +94,6 @@ class LDAPTest extends \VuFindTest\Unit\DbTestCase * Verify that missing port causes failure. * * @return void - * */ public function testWithMissingPort() { @@ -110,7 +108,6 @@ class LDAPTest extends \VuFindTest\Unit\DbTestCase * Verify that missing baseDN causes failure. * * @return void - * */ public function testWithMissingBaseDN() { @@ -125,7 +122,6 @@ class LDAPTest extends \VuFindTest\Unit\DbTestCase * Verify that missing UID causes failure. * * @return void - * */ public function testWithMissingUid() { @@ -191,7 +187,6 @@ class LDAPTest extends \VuFindTest\Unit\DbTestCase * Test login with blank username. * * @return void - * */ public function testLoginWithBlankUsername() { @@ -205,7 +200,6 @@ class LDAPTest extends \VuFindTest\Unit\DbTestCase * Test login with blank password. * * @return void - * */ public function testLoginWithBlankPassword() { 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 30b85dc7ffa..327a73fc4f2 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ManagerTest.php @@ -199,7 +199,6 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * Test security features of switching between auth options (part 2). * * @return void - * */ public function testSwitchingFailure() { @@ -394,7 +393,6 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * Test unsuccessful login (\VuFind\Exception\PasswordSecurity) * * @return void - * */ public function testPasswordSecurityException() { @@ -415,7 +413,6 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * Test unsuccessful login (\VuFind\Exception\Auth) * * @return void - * */ public function testAuthException() { @@ -436,7 +433,6 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * Test that unexpected exceptions get mapped to technical errors. * * @return void - * */ public function testUnanticipatedException() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/MultiAuthTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/MultiAuthTest.php index 8fccaa13eaf..0de2ece8b48 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/MultiAuthTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/MultiAuthTest.php @@ -78,7 +78,6 @@ class MultiAuthTest extends \VuFindTest\Unit\DbTestCase * Verify that missing host causes failure. * * @return void - * */ public function testWithMissingMethodOrder() { @@ -111,7 +110,6 @@ class MultiAuthTest extends \VuFindTest\Unit\DbTestCase * Test login with handler configured to load a service which does not exist. * * @return void - * */ public function testLoginWithBadService() { @@ -130,7 +128,6 @@ class MultiAuthTest extends \VuFindTest\Unit\DbTestCase * as an arbitrary inappropriate class). * * @return void - * */ public function testLoginWithBadClass() { @@ -147,7 +144,6 @@ class MultiAuthTest extends \VuFindTest\Unit\DbTestCase * Test login with blank username. * * @return void - * */ public function testLoginWithBlankUsername() { @@ -161,7 +157,6 @@ class MultiAuthTest extends \VuFindTest\Unit\DbTestCase * Test login with blank password. * * @return void - * */ public function testLoginWithBlankPassword() { 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 106547e0a8a..a78c49f8c5f 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/PluginManagerTest.php @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/SIP2Test.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/SIP2Test.php index f1e1f133174..214ec1f7a5d 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/SIP2Test.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/SIP2Test.php @@ -96,7 +96,6 @@ class SIP2Test extends \VuFindTest\Unit\DbTestCase * Test login with blank username. * * @return void - * */ public function testLoginWithBlankUsername() { @@ -110,7 +109,6 @@ class SIP2Test extends \VuFindTest\Unit\DbTestCase * Test login with blank password. * * @return void - * */ public function testLoginWithBlankPassword() { 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 a9969abb1a7..5d30c271ded 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/PluginManagerTest.php @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 1b7ed9c4b9f..962a5202ee1 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php @@ -44,7 +44,6 @@ class TagTest extends \VuFindTest\Unit\DbTestCase * Test that missing plugin manager causes exception. * * @return void - * */ public function testMissingDependency() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/CartTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/CartTest.php index 88c53c6c024..a837030efb0 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/CartTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/CartTest.php @@ -56,10 +56,12 @@ class CartTest extends \PHPUnit\Framework\TestCase { $this->loader = $this->getMockBuilder(\VuFind\Record\Loader::class) ->setMethods([]) - ->setConstructorArgs([ + ->setConstructorArgs( + [ $this->createMock(\VuFindSearch\Service::class), $this->createMock(\VuFind\RecordDriver\PluginManager::class) - ])->getMock(); + ] + )->getMock(); } /** diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/PluginFactoryTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/PluginFactoryTest.php index b07963d00ec..542bf03565b 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/PluginFactoryTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/PluginFactoryTest.php @@ -251,7 +251,6 @@ class PluginFactoryTest extends \VuFindTest\Unit\TestCase * Test configuration is read-only. * * @return void - * */ public function testReadOnlyConfig() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/VersionTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/VersionTest.php index 1ef2547b9cf..a4d73ad9265 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/VersionTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/VersionTest.php @@ -59,7 +59,6 @@ class VersionTest extends \VuFindTest\Unit\TestCase * Test with a bad directory. * * @return void - * */ public function testMissingFile() { 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 e032ed4d809..273156a142c 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 36a92613b02..c835b7e34ca 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 233d3e515e6..12334aee8d5 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 35fe3b7ff79..c35d9b7dd30 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/PluginManagerTest.php @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 580ef954b81..2765672c6bf 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php index 6810ebaf9a6..05a94763808 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php @@ -61,8 +61,10 @@ class ResultScrollerTest extends TestCase 'currentPosition' => null, 'resultTotal' => null ]; - $this->assertEquals($expected, $plugin->getScrollData( - $results->getMockRecordDriver('sorted20')) + $this->assertEquals( + $expected, $plugin->getScrollData( + $results->getMockRecordDriver('sorted20') + ) ); } @@ -330,8 +332,10 @@ class ResultScrollerTest extends TestCase 'previousRecord' => 'Solr|sorted19', 'nextRecord' => 'Solr|sorted21', 'currentPosition' => 20, 'resultTotal' => 30 ]; - $this->assertEquals($expected, $plugin->getScrollData( - $results->getMockRecordDriver('sorted20')) + $this->assertEquals( + $expected, $plugin->getScrollData( + $results->getMockRecordDriver('sorted20') + ) ); } 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 7146a608274..6cfe340cecd 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php @@ -53,7 +53,6 @@ class LoaderTest extends \VuFindTest\Unit\TestCase * Test that failure to load even the baseline image causes an exception. * * @return void - * */ public function testUtterFailure() { @@ -131,11 +130,11 @@ class LoaderTest extends \VuFindTest\Unit\TestCase /** * Get a loader object to test. * - * @param array $config Configuration - * @param \VuFind\Content\Covers\PluginManager $manager Plugin manager (null to create mock) - * @param ThemeInfo $theme Theme info object (null to create default) - * @param \VuFindHttp\HttpService $httpService HTTP client factory - * @param array|bool $mock Array of functions to mock, or false for real object + * @param array $config Configuration + * @param \VuFind\Content\Covers\PluginManager $manager Plugin manager (null to create mock) + * @param ThemeInfo $theme Theme info object (null to create default) + * @param \VuFindHttp\HttpService $httpService HTTP client factory + * @param array|bool $mock Array of functions to mock, or false for real object * * @return Loader */ 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 73b6f28dbfb..f61e5725c5d 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Db/Table/UserListTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Db/Table/UserListTest.php index b185d07ecbf..d97c23caa2c 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Db/Table/UserListTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Db/Table/UserListTest.php @@ -45,7 +45,6 @@ class UserListTest extends \VuFindTest\Unit\DbTestCase * list. * * @return void - * */ public function testLoginRequiredToCreateList() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/DoiLinker/UnpaywallTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/DoiLinker/UnpaywallTest.php index 1d6d1539a01..536675bb983 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/DoiLinker/UnpaywallTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/DoiLinker/UnpaywallTest.php @@ -46,7 +46,6 @@ class UnpaywallTest extends \VuFindTest\Unit\TestCase * Test configuration validation. * * @return void - * */ public function testConfigValidation() { @@ -66,7 +65,8 @@ class UnpaywallTest extends \VuFindTest\Unit\TestCase $adapter = new TestAdapter(); $testData = [ [ - 'filename' => realpath(__DIR__ + 'filename' => realpath( + __DIR__ . '/../../../../../tests/fixtures/unpaywall/goodresponsepdf' ), 'response' => [ @@ -79,7 +79,8 @@ class UnpaywallTest extends \VuFindTest\Unit\TestCase ] ], [ - 'filename' => realpath(__DIR__ + 'filename' => realpath( + __DIR__ . '/../../../../../tests/fixtures/unpaywall/goodresponseonline' ), 'response' => [ @@ -92,7 +93,8 @@ class UnpaywallTest extends \VuFindTest\Unit\TestCase ] ], [ - 'filename' => realpath(__DIR__ + 'filename' => realpath( + __DIR__ . '/../../../../../tests/fixtures/unpaywall/badresponse' ), 'response' => [] diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Form/FormTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Form/FormTest.php index 036362b6ffe..357934a9c25 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Form/FormTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Form/FormTest.php @@ -91,7 +91,6 @@ class FormTest extends \VuFindTest\Unit\TestCase * Test that the class blocks unknown form IDs. * * @return void - * */ public function testUndefinedFormId() { 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 934978b2b86..67582a18f9f 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 c51395ee0a3..2f773e5309f 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 193c7a6b673..2db0ec683b4 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 7bf0b35cf99..1aaac442a6e 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 @@ -157,7 +157,6 @@ class ExtendedIniTest extends \VuFindTest\Unit\TestCase * Test missing path stack. * * @return void - * */ public function testMissingPathStack() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php index 7b31f319ed9..534d9a2d688 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php @@ -48,7 +48,6 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase * Test that driver complains about missing configuration. * * @return void - * */ public function testMissingConfiguration() { @@ -77,7 +76,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase /** * Tests that logging works correctly * - * @return void + * @return void */ public function testLogging() { @@ -193,7 +192,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase /** * Tests that getDriverConfig works correctly * - * @return void + * @return void */ public function testGetDriverConfig() { @@ -2491,8 +2490,8 @@ class DummyILS extends \VuFind\ILS\Driver\AbstractBase * This is responsible for retrieving the holding information of a certain * record. * - * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param string $id The record id to retrieve the holdings for + * @param array $patron Patron data * @param array $options Extra options (not currently used) * * @throws \VuFind\Exception\ILS diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PAIATest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PAIATest.php index d2034039a46..9ce01eae39f 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PAIATest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PAIATest.php @@ -318,7 +318,9 @@ class PAIATest extends \VuFindTest\Unit\ILSDriverTestCase 'canWrite' => true ]; - /******************* Test cases ***************/ + /******************* + * Test cases + ***************/ /* ok changePassword ok checkRequestIsValid @@ -617,13 +619,17 @@ class PAIATest extends \VuFindTest\Unit\ILSDriverTestCase ->setMethods(['getScope']) ->getMock(); $conn->expects($this->any())->method('getScope') - ->will($this->returnValue([ - 'write_items', - 'change_password', - 'read_fees', - 'read_items', - 'read_patron' - ])); + ->will( + $this->returnValue( + [ + 'write_items', + 'change_password', + 'read_fees', + 'read_items', + 'read_patron' + ] + ) + ); $conn->setHttpService($service); $conn->setConfig($this->validConfig); $conn->init(); 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 c6d182feea2..fdce42d1538 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 e24d67222f3..a6f71fe332e 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php @@ -237,7 +237,6 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test bad to address. * * @return void - * */ public function testBadTo() { @@ -253,7 +252,6 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test bad reply-to address. * * @return void - * */ public function testBadReplyTo() { @@ -271,7 +269,6 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test empty to address. * * @return void - * */ public function testEmptyTo() { @@ -287,7 +284,6 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test that we only accept one recipient by default * * @return void - * */ public function testTooManyRecipients() { @@ -303,7 +299,6 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test bad from address. * * @return void - * */ public function testBadFrom() { @@ -319,7 +314,6 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test bad from address in Address object. * * @return void - * */ public function testBadFromInAddressObject() { @@ -335,7 +329,6 @@ class MailerTest extends \VuFindTest\Unit\TestCase * Test transport exception. * * @return void - * */ public function testTransportException() { 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 32cd2b4d48e..043d113e278 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php @@ -53,7 +53,6 @@ class LoaderTest extends \VuFindTest\Unit\TestCase * Test that failure to load even the baseline image causes an exception. * * @return void - * */ public function testUtterFailure() { 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 c2bbb1c52d2..4a6aa309a26 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/PluginManagerTest.php @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 c9579dd5f71..35ed152a115 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php @@ -76,7 +76,6 @@ class SideFacetsTest extends \VuFindTest\Unit\TestCase * Test missing hierarchical facet helper * * @return void - * */ public function testMissingHierarchicalFacetHelper() { 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 7aa5a44f3ec..2655f89b6f2 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php @@ -53,7 +53,6 @@ class LoaderTest extends TestCase * Test exception for missing record. * * @return void - * */ public function testMissingRecord() { @@ -276,8 +275,8 @@ class LoaderTest extends TestCase /** * Build a loader to test. * - * @param SearchService $service Search service - * @param RecordFactory $factory Record factory (optional) + * @param SearchService $service Search service + * @param RecordFactory $factory Record factory (optional) * @param Cache $recordCache Record Cache * @param FallbackLoader $fallbackLoader Fallback record loader * 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 23ae0b2c2f1..7fc032c97b4 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/PluginManagerTest.php @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 71de0e2c854..8d7acb7659e 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/PluginManagerTest.php @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/TabManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/TabManagerTest.php index ff3c31f0e40..8da93fedeee 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/TabManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/TabManagerTest.php @@ -45,8 +45,8 @@ class TabManagerTest extends \VuFindTest\Unit\TestCase /** * Set up a tab manager for testing. * - * @param PluginManager $pluginManager Plugin manager to use (null for default) - * @param ConfigManager $configManager Config manager to use (null for default) + * @param PluginManager $pluginManager Plugin manager to use (null for default) + * @param ConfigManager $configManager Config manager to use (null for default) * @return TabManager */ protected function getTabManager(PluginManager $pluginManager = null, 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 affc0acdc1f..391a388ac5e 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/PluginManagerTest.php @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 2fbf8d2217f..707a0ef5e35 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Reserves/CsvReaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Reserves/CsvReaderTest.php @@ -136,7 +136,6 @@ class CsvReaderTest extends \VuFindTest\Unit\TestCase * Test loading an empty file. * * @return void - * */ public function testEmptyFile() { 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 d38cd537d6b..9958062223e 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 a0029539c8e..6820dbe1ba5 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/UserTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/UserTest.php index 077f20fcf34..f53cebe9944 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/UserTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/UserTest.php @@ -125,8 +125,8 @@ class UserTest extends \VuFindTest\Unit\TestCase { $authorizationService = $this->getMockBuilder(\ZfcRbac\Service\AuthorizationService::class) - ->disableOriginalConstructor() - ->getMock(); + ->disableOriginalConstructor() + ->getMock(); $authorizationService ->method('getIdentity') ->will($this->returnValue($this->getMockUser())); 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 6dbd76adce6..7d6d0a0208f 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php @@ -92,7 +92,6 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase * Test unexpected response * * @return void - * */ public function testUnexpectedResponse() { @@ -115,7 +114,6 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase * Test unsuccessful query * * @return void - * */ public function testFailureResponse() { @@ -137,7 +135,6 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase * Test an exception in the mail client * * @return void - * */ public function testClientException() { 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 fa35d2f5b8c..f45f9547966 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/BackendManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/BackendManagerTest.php @@ -48,7 +48,6 @@ class BackendManagerTest extends TestCase * Test that get() throws on a non-object. * * @return void - * */ public function testGetThrowsOnNonObject() { @@ -67,7 +66,6 @@ class BackendManagerTest extends TestCase * Test that get() throws on a non-backend. * * @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 4fe0afb6c48..df70c7b3b3f 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 0e4783afa1a..6a366750bc9 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/PrimoPermissionHandlerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/PrimoPermissionHandlerTest.php index da295191bb2..a0e60645a06 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/PrimoPermissionHandlerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/PrimoPermissionHandlerTest.php @@ -139,7 +139,6 @@ class PrimoPermissionHandlerTest extends TestCase * This should throw an Exception. * * @return void - * */ public function testWithoutConfig() { @@ -209,12 +208,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerMemberAuthNotSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberAuthNotSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals('DEFAULT', $handler->getInstCode()); @@ -244,12 +249,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerMemberAuthSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberAuthSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(true, $handler->hasPermission()); @@ -267,12 +278,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerMemberAuthNotSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberAuthNotSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(false, $handler->hasPermission()); @@ -290,12 +307,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerDefaultAuthSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerDefaultAuthSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(true, $handler->hasPermission()); @@ -313,12 +336,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerDefaultAuthNotSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerDefaultAuthNotSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(false, $handler->hasPermission()); @@ -344,7 +373,9 @@ class PrimoPermissionHandlerTest extends TestCase $this->assertEquals(false, $handler->hasPermission()); } - /***************** Tests with configuration without default ************/ + /***************** + * Tests with configuration without default + ************/ /** * Test the handler if permission matches @@ -358,12 +389,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerMemberAuthSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberAuthSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(true, $handler->hasPermission()); @@ -381,12 +418,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerMemberAuthNotSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberAuthNotSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(false, $handler->hasPermission()); @@ -444,12 +487,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerDefaultAuthSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerDefaultAuthSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(false, $handler->hasPermission()); @@ -467,18 +516,26 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerDefaultAuthNotSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerDefaultAuthNotSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(false, $handler->hasPermission()); } - /***************** Tests with configuration with default and onCampusRule for default ************/ + /***************** + * Tests with configuration with default and onCampusRule for default + ************/ /** * Test the handler if permission (member and deafult) does not match @@ -492,12 +549,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerMemberAuthNotSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberAuthNotSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(false, $handler->hasPermission()); @@ -517,12 +580,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerDefaultAuthNotSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerDefaultAuthNotSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals('DEFAULT', $handler->getInstCode()); @@ -540,12 +609,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerDefaultAuthSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerDefaultAuthSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(true, $handler->hasPermission()); @@ -563,18 +638,26 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.MEMBER'), - $this->equalTo('primo.defaultRule') - )) - ->will($this->returnCallback([$this, - 'handlerDefaultAuthNotSuccessfullCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.MEMBER'), + $this->equalTo('primo.defaultRule') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerDefaultAuthNotSuccessfullCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(false, $handler->hasPermission()); } - /***************** Tests with configuration with one member and onCampusRule ************/ + /***************** + * Tests with configuration with one member and onCampusRule + ************/ /** * Test the handler if permission (member and default) does not match @@ -588,13 +671,19 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.defaultRule'), - $this->equalTo('primo.isAtMEMBER'), - $this->equalTo('primo.isOnCampusAtMEMBER') - )) - ->will($this->returnCallback([$this, - 'handlerMemberIsOnCampusCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.defaultRule'), + $this->equalTo('primo.isAtMEMBER'), + $this->equalTo('primo.isOnCampusAtMEMBER') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberIsOnCampusCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals('MEMBER', $handler->getInstCode()); @@ -615,13 +704,19 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.defaultRule'), - $this->equalTo('primo.isAtMEMBER'), - $this->equalTo('primo.isOnCampusAtMEMBER') - )) - ->will($this->returnCallback([$this, - 'handlerMemberIsNotOnCampusCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.defaultRule'), + $this->equalTo('primo.isAtMEMBER'), + $this->equalTo('primo.isOnCampusAtMEMBER') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberIsNotOnCampusCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals('MEMBER', $handler->getInstCode()); @@ -640,13 +735,19 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.defaultRule'), - $this->equalTo('primo.isAtMEMBER'), - $this->equalTo('primo.isOnCampusAtMEMBER') - )) - ->will($this->returnCallback([$this, - 'handlerIsNotAMemberCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.defaultRule'), + $this->equalTo('primo.isAtMEMBER'), + $this->equalTo('primo.isOnCampusAtMEMBER') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerIsNotAMemberCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals('DEFAULT', $handler->getInstCode()); @@ -665,20 +766,28 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.defaultRule'), - $this->equalTo('primo.isAtMEMBER'), - $this->equalTo('primo.isOnCampusAtMEMBER') - )) - ->will($this->returnCallback([$this, - 'handlerIsOnDefaultCampusCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.defaultRule'), + $this->equalTo('primo.isAtMEMBER'), + $this->equalTo('primo.isOnCampusAtMEMBER') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerIsOnDefaultCampusCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals('DEFAULT', $handler->getInstCode()); $this->assertEquals(true, $handler->hasPermission()); } - /***************** Tests with configuration with one member and onCampusRule ************/ + /***************** + * Tests with configuration with one member and onCampusRule + ************/ /** * Test the handler if permission (member and deafult) does not match @@ -694,12 +803,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.isAtMEMBER'), - $this->equalTo('primo.isOnCampusAtMEMBER') - )) - ->will($this->returnCallback([$this, - 'handlerMemberIsOnCampusCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.isAtMEMBER'), + $this->equalTo('primo.isOnCampusAtMEMBER') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberIsOnCampusCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals('MEMBER', $handler->getInstCode()); @@ -722,12 +837,18 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.isAtMEMBER'), - $this->equalTo('primo.isOnCampusAtMEMBER') - )) - ->will($this->returnCallback([$this, - 'handlerMemberIsNotOnCampusCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.isAtMEMBER'), + $this->equalTo('primo.isOnCampusAtMEMBER') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerMemberIsNotOnCampusCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals('MEMBER', $handler->getInstCode()); @@ -748,19 +869,27 @@ class PrimoPermissionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $mockAuth->expects($this->any())->method('isGranted') - ->with($this->logicalOr( - $this->equalTo('primo.isAtMEMBER'), - $this->equalTo('primo.isOnCampusAtMEMBER') - )) - ->will($this->returnCallback([$this, - 'handlerIsNotAMemberCallback'])); + ->with( + $this->logicalOr( + $this->equalTo('primo.isAtMEMBER'), + $this->equalTo('primo.isOnCampusAtMEMBER') + ) + ) + ->will( + $this->returnCallback( + [$this, + 'handlerIsNotAMemberCallback'] + ) + ); $handler->setAuthorizationService($mockAuth); $this->assertEquals(false, $handler->getInstCode()); $this->assertEquals(false, $handler->hasPermission()); } - /***************** Tests with configuration with default only (no default onCampusRule) ************/ + /***************** + * Tests with configuration with default only (no default onCampusRule) + ************/ /** * Permission cannot be granted without an onCampusRule @@ -800,7 +929,9 @@ class PrimoPermissionHandlerTest extends TestCase $this->assertEquals('DEFAULT', $handler->getInstCode()); } - /***************** Callback helper functions ************/ + /***************** + * Callback helper functions + ************/ /** * Helper function (Callback) to inject different return values 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 1f38219a792..9a75700d5a3 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 @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { 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 3f0a9dda9f7..091bd8a2311 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 @@ -465,7 +465,6 @@ class SpellingProcessorTest extends TestCase * Test detection of bad Solr response format. * * @return void - * */ public function testDetectionOfMissingExtendedResultsSetting() { 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 bd4a942a7f3..a19eff2f028 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/PluginManagerTest.php @@ -57,7 +57,6 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * Test expected interface. * * @return void - * */ public function testExpectedInterface() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/UrlShortener/DatabaseTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/UrlShortener/DatabaseTest.php index b3a11234af0..144b5089bbb 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/UrlShortener/DatabaseTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/UrlShortener/DatabaseTest.php @@ -110,7 +110,6 @@ class DatabaseTest extends \PHPUnit\Framework\TestCase * Test that resolve errors correctly when given bad input * * @return void - * */ public function testResolutionOfBadInput() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/UrlShortener/NoneTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/UrlShortener/NoneTest.php index 010ea7a6591..738e0e8c1a7 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/UrlShortener/NoneTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/UrlShortener/NoneTest.php @@ -56,7 +56,6 @@ class NoneTest extends \PHPUnit\Framework\TestCase * Test that resolve is not supported. * * @return void - * */ public function testNoResolution() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/PermissionTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/PermissionTest.php index 77d9c909edb..89e99502ca5 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/PermissionTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/PermissionTest.php @@ -80,13 +80,15 @@ class PermissionTest extends \VuFindTest\Unit\ViewHelperTestCase */ public function testMessageDisplay() { - $mockPmdMessage = $this->getMockPmd([ + $mockPmdMessage = $this->getMockPmd( + [ 'deniedTemplateBehavior' => [ 'action' => 'showMessage', 'value' => 'dl_translatable_test', 'params' => [], ], - ]); + ] + ); $helper = new Permission($this->getMockPm(false), $mockPmdMessage); $helper->setView($this->getMockView()); @@ -99,7 +101,6 @@ class PermissionTest extends \VuFindTest\Unit\ViewHelperTestCase * Test the template display * * @return void - * */ public function testTemplateDisplay() { @@ -129,13 +130,15 @@ class PermissionTest extends \VuFindTest\Unit\ViewHelperTestCase */ public function testExistingTemplateDisplay() { - $mockPmd = $this->getMockPmd([ + $mockPmd = $this->getMockPmd( + [ 'deniedTemplateBehavior' => [ 'action' => 'showTemplate', 'value' => 'ajax/status-available.phtml', 'params' => [], ], - ]); + ] + ); $helper = new Permission($this->getMockPm(false), $mockPmd); $helper->setView($this->getMockView()); 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 4b390054ca1..8daf2b14155 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 @@ -45,7 +45,6 @@ class RecordTest extends \PHPUnit\Framework\TestCase * Test attempting to display a template that does not exist. * * @return void - * */ public function testMissingTemplate() { @@ -439,7 +438,6 @@ class RecordTest extends \PHPUnit\Framework\TestCase * Test getLinkDetails with invalid details * * @return void - * */ public function testGetLinkDetailsFailure() { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/TranslateTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/TranslateTest.php index e8beecb5006..93c6cc96624 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/TranslateTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/TranslateTest.php @@ -50,8 +50,10 @@ class TranslateTest extends \PHPUnit\Framework\TestCase { $translate = new Translate(); // Simple case that tests default values and tokens in a single pass: - $this->assertEquals('baz', $translate->__invoke( - 'foo', ['%%token%%' => 'baz'], '%%token%%') + $this->assertEquals( + 'baz', $translate->__invoke( + 'foo', ['%%token%%' => 'baz'], '%%token%%' + ) ); } @@ -59,7 +61,6 @@ class TranslateTest extends \PHPUnit\Framework\TestCase * Test invalid translation array * * @return void - * */ public function testTranslateWithEmptyArray() { @@ -74,7 +75,6 @@ class TranslateTest extends \PHPUnit\Framework\TestCase * Test invalid translation array * * @return void - * */ public function testTranslateWithOverfilledArray() { @@ -98,22 +98,32 @@ class TranslateTest extends \PHPUnit\Framework\TestCase ); // Simple case that tests default values and tokens in a single pass: - $this->assertEquals('baz', $translate->__invoke( - 'foo', ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'baz', $translate->__invoke( + 'foo', ['%%token%%' => 'baz'], 'failure' + ) ); // Test namespace syntax: - $this->assertEquals('baz', $translate->__invoke( - 'default::foo', ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'baz', $translate->__invoke( + 'default::foo', ['%%token%%' => 'baz'], 'failure' + ) ); // Test array syntax: - $this->assertEquals('baz', $translate->__invoke( - ['foo'], ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'baz', $translate->__invoke( + ['foo'], ['%%token%%' => 'baz'], 'failure' + ) ); - $this->assertEquals('baz', $translate->__invoke( - [null, 'foo'], ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'baz', $translate->__invoke( + [null, 'foo'], ['%%token%%' => 'baz'], 'failure' + ) ); - $this->assertEquals('baz', $translate->__invoke( - ['default', 'foo'], ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'baz', $translate->__invoke( + ['default', 'foo'], ['%%token%%' => 'baz'], 'failure' + ) ); } @@ -132,22 +142,28 @@ class TranslateTest extends \PHPUnit\Framework\TestCase // Test a TranslatableString with a translation. $str1 = new TranslatableString('foo', 'bar'); // Simple case that tests default values and tokens in a single pass: - $this->assertEquals('baz', $translate->__invoke( - $str1, ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'baz', $translate->__invoke( + $str1, ['%%token%%' => 'baz'], 'failure' + ) ); // Test a TranslatableString with a fallback. $str2 = new TranslatableString('bar', 'foo'); // Simple case that tests default values and tokens in a single pass: - $this->assertEquals('baz', $translate->__invoke( - $str2, ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'baz', $translate->__invoke( + $str2, ['%%token%%' => 'baz'], 'failure' + ) ); // Test a TranslatableString with no fallback. $str3 = new TranslatableString('xyzzy', 'bar'); // Simple case that tests default values and tokens in a single pass: - $this->assertEquals('failure', $translate->__invoke( - $str3, ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'failure', $translate->__invoke( + $str3, ['%%token%%' => 'baz'], 'failure' + ) ); } @@ -193,13 +209,17 @@ class TranslateTest extends \PHPUnit\Framework\TestCase ); // This one will work -- TextDomain defined above - $this->assertEquals('baz', $translate->__invoke( - 'zap::foo', ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'baz', $translate->__invoke( + 'zap::foo', ['%%token%%' => 'baz'], 'failure' + ) ); // This one will use incoming string -- TextDomain undefined - $this->assertEquals('failure', $translate->__invoke( - 'undefined::foo', ['%%token%%' => 'baz'], 'failure') + $this->assertEquals( + 'failure', $translate->__invoke( + 'undefined::foo', ['%%token%%' => 'baz'], 'failure' + ) ); } diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/BackendTest.php index 9e137d08b59..830bcc9818e 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/BackendTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/BackendTest.php @@ -52,7 +52,6 @@ class BackendTest extends \VuFindTest\Unit\TestCase * Test retrieving a record (not supported). * * @return void - * */ public function testRetrieve() { diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/QueryBuilderTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/QueryBuilderTest.php index f1961ba0489..57a1d4e206e 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/QueryBuilderTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/QueryBuilderTest.php @@ -62,7 +62,6 @@ class QueryBuilderTest extends TestCase * Test advanced query parsing (not currently supported) * * @return void - * */ public function testAdvanced() { diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/Response/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/Response/RecordCollectionFactoryTest.php index 28378543d41..92a598ebabe 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/Response/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/Response/RecordCollectionFactoryTest.php @@ -59,7 +59,6 @@ class RecordCollectionFactoryTest extends TestCase * Test invalid input. * * @return void - * */ public function testInvalidInput() { 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 9aea6cc4397..90988f78dae 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 @@ -46,7 +46,6 @@ class RecordCollectionFactoryTest extends TestCase * Test constructor exceptions. * * @return void - * */ public function testConstructorRequiresFactoryFunction() { @@ -60,7 +59,6 @@ class RecordCollectionFactoryTest extends TestCase * Test constructor exceptions. * * @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 eea6d5a4d57..62f718ce17b 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 @@ -46,7 +46,6 @@ class RecordCollectionFactoryTest extends TestCase * Test constructor exception. * * @return void - * */ public function testConstructorRequiresValidFactoryFunction() { @@ -60,7 +59,6 @@ class RecordCollectionFactoryTest extends TestCase * Test invalid input. * * @return void - * */ public function testInvalidInput() { 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 fd2d39d97b3..4c4445f5636 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,7 +53,6 @@ class BackendTest extends \VuFindTest\Unit\TestCase * Test retrieving a record (not supported). * * @return void - * */ public function testRetrieve() { @@ -144,7 +143,6 @@ class BackendTest extends \VuFindTest\Unit\TestCase * Test search exception handling. * * @return void - * */ 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 719e3112b9a..36f6a9b99a2 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,7 +62,6 @@ class QueryBuilderTest extends TestCase * Test advanced query parsing (not currently supported) * * @return void - * */ public function testAdvanced() { 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 814dbe8452e..e9161e72e0e 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,7 +59,6 @@ class RecordCollectionFactoryTest extends TestCase * Test invalid input. * * @return void - * */ public function testInvalidInput() { 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 9f30aeb1b7d..150faeedbcd 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,7 +132,6 @@ class BackendTest extends \VuFindTest\Unit\TestCase * Test search exception handling. * * @return void - * */ public function testSearchWrapsPrimoException() { @@ -150,7 +149,6 @@ class BackendTest extends \VuFindTest\Unit\TestCase * Test retrieve exception handling. * * @return void - * */ 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 1bff6c91b7f..4e2a32ee787 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,7 +124,6 @@ class ConnectorTest extends TestCase * status. * * @return void - * */ public function testErrorInSuccessfulResponse() { 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 4e50e11ffa4..38ede323840 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 @@ -46,7 +46,6 @@ class RecordCollectionFactoryTest extends TestCase * Test constructor exception. * * @return void - * */ public function testConstructorRequiresValidFactoryFunction() { @@ -60,7 +59,6 @@ class RecordCollectionFactoryTest extends TestCase * Test invalid input. * * @return void - * */ public function testInvalidInput() { 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 eeee821fb93..e040dc2ffde 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 @@ -171,7 +171,6 @@ class BackendTest extends TestCase * Test handling of a bad JSON response. * * @return void - * */ public function testBadJson() { @@ -190,7 +189,6 @@ class BackendTest extends TestCase * Test injectResponseWriter throws on incompatible response writer. * * @return void - * */ public function testInjectResponseWriterThrownOnIncompabileResponseWriter() { @@ -206,7 +204,6 @@ class BackendTest extends TestCase * Test injectResponseWriter throws on incompatible named list setting. * * @return void - * */ public function testInjectResponseWriterThrownOnIncompabileNamedListSetting() { @@ -285,7 +282,6 @@ class BackendTest extends TestCase * Test refining an alphabrowse exception (string 1). * * @return void - * */ public function testRefineAlphaBrowseException() { @@ -299,7 +295,6 @@ class BackendTest extends TestCase * Test refining an alphabrowse exception (string 2). * * @return void - * */ public function testRefineAlphaBrowseExceptionWithAltString() { @@ -313,7 +308,6 @@ class BackendTest extends TestCase * Test that we don't refine a non-alphabrowse-related exception. * * @return void - * */ public function testRefineAlphaBrowseExceptionWithNonBrowseString() { 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 1c1e9dc7767..948cf68224b 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 @@ -85,7 +85,6 @@ class ConnectorTest extends TestCase * Test RemoteErrorException is thrown on a remote 5xx error. * * @return void - * */ public function testInternalServerError() { @@ -100,7 +99,6 @@ class ConnectorTest extends TestCase * Test RequestErrorException is thrown on a remote 4xx error. * * @return void - * */ public function testBadRequestError() { @@ -115,7 +113,6 @@ class ConnectorTest extends TestCase * Test InvalidArgumentException invalid adapter object. * * @return void - * */ public function testSetAdapterThrowsInvalidObject() { @@ -130,7 +127,6 @@ class ConnectorTest extends TestCase * Test InvalidArgumentException unknown serialization format. * * @return void - * */ public function testSaveThrowsUnknownFormat() { diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/HandlerMapTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/HandlerMapTest.php index e65a186b10a..27d01c869d1 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/HandlerMapTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/HandlerMapTest.php @@ -47,7 +47,6 @@ class HandlerMapTest extends TestCase * Test exception on duplicate fallback handler. * * @return void - * */ public function testSetHandlerMapThrowsOnDuplicateFallback() { @@ -65,7 +64,6 @@ class HandlerMapTest extends TestCase * Test exception on duplicate handler. * * @return void - * */ public function testSetHandlerMapThrowsOnDuplicateFunctionHandler() { @@ -83,7 +81,6 @@ class HandlerMapTest extends TestCase * Test exception on undefined handler. * * @return void - * */ public function testGetHandlerThrowsOnUndefinedFunctionHandler() { @@ -98,7 +95,6 @@ class HandlerMapTest extends TestCase * Test exception on unexpected type. * * @return void - * */ public function testGetParametersThrowsOnUndefinedType() { @@ -113,7 +109,6 @@ class HandlerMapTest extends TestCase * Test exception on unexpected type. * * @return void - * */ public function testSetParametersThrowsOnUndefinedType() { 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 44bbb1aa549..ab2dae7afae 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,7 +59,6 @@ class RecordCollectionFactoryTest extends TestCase * Test invalid input. * * @return void - * */ public function testInvalidInput() { 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 6f3d9922343..b0d6362be05 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,7 +120,6 @@ class BackendTest extends TestCase * Test retrieve exception handling. * * @return void - * */ public function testRetrieveWrapsSummonException() { @@ -173,7 +172,6 @@ class BackendTest extends TestCase * Test search exception handling. * * @return void - * */ 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 ecfb188f38f..c67bdd7921b 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 @@ -46,7 +46,6 @@ class RecordCollectionFactoryTest extends TestCase * Test constructor exceptions. * * @return void - * */ public function testConstructorRequiresFactoryFunction() { @@ -60,7 +59,6 @@ class RecordCollectionFactoryTest extends TestCase * Test constructor exceptions. * * @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 a17eac3d914..465aad64068 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,7 +72,6 @@ class ConnectorTest extends \PHPUnit\Framework\TestCase * Test "get holdings" HTTP failure * * @return void - * */ 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 d20c7e6ccc5..2a514ee990f 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,7 +45,6 @@ class RecordCollectionFactoryTest extends \PHPUnit\Framework\TestCase * Test bad callback. * * @return void - * */ public function testBadCallback() { @@ -59,7 +58,6 @@ class RecordCollectionFactoryTest extends \PHPUnit\Framework\TestCase * Test bad factory input. * * @return void - * */ public function testBadFactoryInput() { 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 ea415abaf12..67e9853650e 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Query/QueryGroupTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Query/QueryGroupTest.php @@ -139,7 +139,6 @@ class QueryGroupTest extends TestCase * Test setting an invalid operator. * * @return void - * */ public function testIllegalOperator() { diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php index 4fd0429edc2..c62bb7e85be 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php @@ -85,7 +85,6 @@ class SearchServiceTest extends TestCase * Test exception-throwing retrieve action. * * @return void - * */ public function testRetrieveException() { @@ -111,7 +110,6 @@ class SearchServiceTest extends TestCase * Test exception-throwing search action. * * @return void - * */ public function testSearchException() { @@ -137,7 +135,6 @@ class SearchServiceTest extends TestCase * We'll test this by mimicing the testSearchException test above. * * @return void - * */ public function testGetIdsProxyingSearchException() { @@ -163,7 +160,6 @@ class SearchServiceTest extends TestCase * We'll test this by mimicing the testSearchException test above. * * @return void - * */ public function testGetIdsException() { @@ -249,7 +245,6 @@ class SearchServiceTest extends TestCase * Test exception-throwing batch retrieve action (with RetrieveBatchInterface). * * @return void - * */ public function testRetrieveBatchInterfaceException() { @@ -283,7 +278,6 @@ class SearchServiceTest extends TestCase * RetrieveBatchInterface). * * @return void - * */ public function testRetrieveBatchNoInterfaceException() { @@ -344,7 +338,6 @@ class SearchServiceTest extends TestCase * Test random (with RandomInterface) exception. * * @return void - * */ public function testRandomInterfaceWithException() { @@ -517,7 +510,6 @@ class SearchServiceTest extends TestCase * Test random (without RandomInterface) exception. * * @return void - * */ public function testRandomNoInterfaceWithExceptionAtFirstSearch() { @@ -545,7 +537,6 @@ class SearchServiceTest extends TestCase * Test random (without RandomInterface) exception at item retrieval search. * * @return void - * */ public function testRandomNoInterfaceWithExceptionAtItemSearch() { @@ -589,7 +580,6 @@ class SearchServiceTest extends TestCase * Test random (without RandomInterface) exception with less results than limit. * * @return void - * */ public function testRandomNoInterfaceExceptionWithLessResultsThanLimit() { @@ -663,7 +653,6 @@ class SearchServiceTest extends TestCase * Test similar action on bad backend. * * @return void - * */ public function testSimilarOnNonSupportingBackend() { @@ -679,7 +668,6 @@ class SearchServiceTest extends TestCase * Test exception-throwing similar action. * * @return void - * */ public function testSimilarException() { @@ -711,7 +699,6 @@ class SearchServiceTest extends TestCase * Test a failure to resolve. * * @return void - * */ public function testFailedResolve() { diff --git a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php index 2cdec12c715..4548f9da68c 100644 --- a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php +++ b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php @@ -82,7 +82,6 @@ class ThemeInfoTest extends Unit\TestCase * Test setting invalid theme * * @return void - * */ public function testInvalidTheme() { -- GitLab