diff --git a/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/AbstractBaseTest.php b/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/AbstractBaseTest.php index ae5dd3e2e0187bb81055c941b619a76fb8645363..a93ff25268c04138fd950b712442c414962ceacf 100644 --- a/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/AbstractBaseTest.php +++ b/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/AbstractBaseTest.php @@ -47,9 +47,24 @@ class AbstractBaseTest extends \VuFindTest\Unit\TestCase class FakeInterface implements \VuFindHttp\HttpServiceInterface { - public function proxify(\Zend\Http\Client $client, array $options = []) {} - public function get($url, array $params = [], $timeout = null) {} - public function post($url, $body = null, $type = 'application/octet-stream', $timeout = null) {} - public function postForm($url, array $params = [], $timeout = null) {} - public function createClient($url, $method = \Zend\Http\Request::METHOD_GET, $timeout = null) {} + public function proxify(\Zend\Http\Client $client, array $options = []) + { + + } + public function get($url, array $params = [], $timeout = null) + { + + } + public function post($url, $body = null, $type = 'application/octet-stream', $timeout = null) + { + + } + public function postForm($url, array $params = [], $timeout = null) + { + + } + public function createClient($url, $method = \Zend\Http\Request::METHOD_GET, $timeout = null) + { + + } } \ No newline at end of file diff --git a/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/ManagerTest.php b/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/ManagerTest.php index 471731009a50a96b69ad5146213ac30610796a49..1f7ff215a3ed534d8b1aa3e603f00500efd0dff7 100644 --- a/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/ManagerTest.php +++ b/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/ManagerTest.php @@ -88,7 +88,8 @@ class ManagerTest extends \VuFindTest\Unit\TestCase class FakeServiceLocator { - public function get($class) { + public function get($class) + { if($class == "VuDL\\Connection\\First") { return new First(); } else { diff --git a/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/SolrTest.php b/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/SolrTest.php index 2479728595266dfc9f0bb6ba0deae017ef1dd7b1..564625c6762ba62186ab39b338b0493cbc91b1f5 100644 --- a/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/SolrTest.php +++ b/module/VuDL/tests/unit-tests/src/VuDLTest/Connection/SolrTest.php @@ -106,11 +106,13 @@ class SolrTest extends \VuFindTest\Unit\TestCase $this->assertEquals(null, $subject->getDetails('id', false)); $this->assertEquals(["author" => ["A1","A2"],"series" => "S1"], $subject->getDetails('id', false)); - $this->assertEquals([ + $this->assertEquals( + [ "author" => ["title" => "Author", "value" => ["A1","A2"]], "bacon" => ["title" => "Yum", "value" => ["MORE"]], "series" => ["title" => "Series", "value" => "S1"], - ], $subject->getDetails('id', true)); + ], $subject->getDetails('id', true) + ); $this->assertEquals(null, $subject->getLabel('id')); $this->assertEquals("LABEL", $subject->getLabel('id')); diff --git a/module/VuFind/src/VuFind/Route/RouteGenerator.php b/module/VuFind/src/VuFind/Route/RouteGenerator.php index 3ef398b365ea7f8cf182c2be2f1b6d2710265cd7..74273e5b71cce43578dd282642e14a4ecc76132b 100644 --- a/module/VuFind/src/VuFind/Route/RouteGenerator.php +++ b/module/VuFind/src/VuFind/Route/RouteGenerator.php @@ -116,7 +116,7 @@ class RouteGenerator /** * Add record route to the configuration. * - * @param array $config Configuration array to update + * @param array $config Configuration array to update * @param string $routeBase Base name to use for routes * @param string $controller Controller to point routes toward * diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/View/Helper/Root/ResultFeedTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/View/Helper/Root/ResultFeedTest.php index 45add6688c96ced6d3462ae9cff8169d276c2a02..d11f6dc71d37bf26ee07639a07df34506acbdf24 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/View/Helper/Root/ResultFeedTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/View/Helper/Root/ResultFeedTest.php @@ -67,7 +67,8 @@ class ResultFeedTest extends \VuFindTest\Unit\ViewHelperTestCase 'VuFind\View\Helper\Root\RecordLink', [], [new \VuFind\Record\Router( $this->getServiceManager()->get('VuFind\RecordLoader'), - new \Zend\Config\Config([])) + new \Zend\Config\Config([]) + ) ] ); $recordLink->expects($this->any())->method('getUrl') 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 2e1befc3650ea8a592c88a4fe93754fdbb9c1f09..4013852d9755f1e1c4dbd8ddd02d8d4672002cdf 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ChoiceAuthTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ChoiceAuthTest.php @@ -46,7 +46,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException \VuFind\Exception\Auth + * @expectedException \VuFind\Exception\Auth * @expectedExceptionMessage One or more ChoiceAuth parameters are missing. */ public function testBadConfiguration() @@ -60,7 +60,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException \Exception + * @expectedException \Exception * @expectedExceptionMessage Plugin manager missing. */ public function testMissingPluginManager() @@ -177,7 +177,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException \Exception + * @expectedException \Exception * @expectedExceptionMessage Illegal setting: foo */ 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 634b239618fddac2ef4a20dd1ddfe0637d2b7115..11b8251e2f4ddab2c5533e4d08f1046d4121037e 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php @@ -44,7 +44,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * * @return void * - * @expectedException VuFind\Exception\Auth + * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage Username cannot be blank */ public function testEmptyCreateRequest() @@ -58,7 +58,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * * @return void * - * @expectedException VuFind\Exception\Auth + * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage Password cannot be blank */ public function testEmptyPasswordCreateRequest() @@ -74,7 +74,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * * @return void * - * @expectedException VuFind\Exception\Auth + * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage Passwords do not match */ public function testMismatchedPasswordCreateRequest() @@ -90,7 +90,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * * @return void * - * @expectedException Exception + * @expectedException Exception * @expectedExceptionMessage DB table manager missing. */ public function testCreateWithMissingTableManager() @@ -104,7 +104,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * * @return void * - * @expectedException VuFind\Exception\Auth + * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage That email address is already used */ public function testCreateDuplicateEmail() @@ -130,7 +130,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase * * @return void * - * @expectedException VuFind\Exception\Auth + * @expectedException VuFind\Exception\Auth * @expectedExceptionMessage That username is already taken */ public function testCreateDuplicateUsername() 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 605e60b4656419996c21c7c362e108b1e5502e46..c22baefdb2a0cf4cdd079e8037971805939467d3 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ManagerTest.php @@ -196,7 +196,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException \Exception + * @expectedException \Exception * @expectedExceptionMessage Illegal authentication method: MultiILS */ public function testSwitchingFailure() @@ -334,7 +334,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException \VuFind\Exception\PasswordSecurity + * @expectedException \VuFind\Exception\PasswordSecurity * @expectedExceptionMessage Boom */ public function testPasswordSecurityException() @@ -353,7 +353,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException \VuFind\Exception\Auth + * @expectedException \VuFind\Exception\Auth * @expectedExceptionMessage Blam */ public function testAuthException() @@ -372,7 +372,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException \VuFind\Exception\Auth + * @expectedException \VuFind\Exception\Auth * @expectedExceptionMessage authentication_error_technical */ public function testUnanticipatedException() @@ -477,8 +477,8 @@ class ManagerTest extends \VuFindTest\Unit\TestCase protected function getMockUserTable() { return $this->getMockBuilder('VuFind\Db\Table\User') - ->disableOriginalConstructor() - ->getMock(); + ->disableOriginalConstructor() + ->getMock(); } /** 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 5e713e201f7d1b685d36dae59d876500efb0ee45..c5de713c86e1cfb34ebd68929ff6a32d062242a5 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/PluginManagerTest.php @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Auth\AbstractBase */ public function testExpectedInterface() 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 d50e417cd54f56fe2aee88fab5db426ca76103ef..059c717b268c0dbace598d8faf12714670a08b3e 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/PluginManagerTest.php @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Autocomplete\AutocompleteInterface */ 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 34d71f2b346f77194f87660b156258b8a4b15237..b3e2175caef657fc7e729dbc96e47a1202e9bbc4 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,7 @@ class TagTest extends \VuFindTest\Unit\DbTestCase * * @return void * - * @expectedException Exception + * @expectedException Exception * @expectedExceptionMessage DB table manager missing. */ public function testMissingDependency() diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/Reader/CacheDecoratorTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/Reader/CacheDecoratorTest.php index e1b5ccb72f41ee2b608079083fc6c60dfb1f1edc..54a188b7dcdf11501d49274cb60634e0e030d79b 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/Reader/CacheDecoratorTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/Reader/CacheDecoratorTest.php @@ -51,17 +51,17 @@ class CacheDecoratorTest extends \PHPUnit_Framework_TestCase { $cache = $this->getMockForAbstractClass('Zend\Cache\Storage\StorageInterface', ['setItem', 'hasItem']); $cache->expects($this->exactly(2)) - ->method('setItem'); + ->method('setItem'); $cache->expects($this->exactly(2)) - ->method('hasItem') - ->will($this->returnValue(false)); + ->method('hasItem') + ->will($this->returnValue(false)); $reader = $this->getMockForAbstractClass('Zend\Config\Reader\ReaderInterface', ['fromFile', 'fromString']); $reader->expects($this->once()) - ->method('fromFile') - ->will($this->returnValue([])); + ->method('fromFile') + ->will($this->returnValue([])); $reader->expects($this->once()) - ->method('fromString') - ->will($this->returnValue([])); + ->method('fromString') + ->will($this->returnValue([])); $deco = new CacheDecorator($reader, $cache); $deco->fromFile('ignore'); $deco->fromString('ignore'); 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 e04eddd576eff8a47fa73c5fdfad97f79353be72..e21f310ddde468ba5f26ef9dc0ec509f4a195eab 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase */ 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 0ecd0db4e03c74d8695620e230c5491068fb27bd..526e21c707efa78a2a0f9c33af6611a96ede6962 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractCover */ 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 06584f951bf04fae80a5e9e4cebe6d6c540f132b..9a9fc23af1aa9f1fd7825f955d611fe6c7ebd75b 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase */ 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 d69ef24be5349b3d75fa6349162e0f55b454e480..473039920ef51776e4d65e50471784dd9c5a5be4 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/PluginManagerTest.php @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\Loader */ 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 8c091757d09ad4314fda7dc4487bb61a0568f5e7..f3b46ce7588c4d2317ddb91937eaceffc3fa9514 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase */ 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 aa4fa37938e33b6191dc75fe16bd997d81820da5..1bd07ea2375448e03b86fd7963f049848f28cf40 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 @@ -185,7 +185,7 @@ class ResultScrollerTest extends TestCase * Get mock result scroller * * @param \VuFind\Search\Base\Results restoreLastSearch results (null to ignore) - * @param array $methods Methods to mock + * @param array $methods Methods to mock * * @return ResultScroller */ 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 0564f62138528869d0c6f3266b12db848518b341..2ff4dcda750c12691707d2e25d37536712bdebdc 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php @@ -54,7 +54,7 @@ class LoaderTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Exception + * @expectedException Exception * @expectedExceptionMessage Could not load default fail image. */ public function testUtterFailure() 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 e52e2024201093a129e83de9ee97480a92736dbf..2ee176fe0738c1031b3b03402017106469d03532 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Db\Table\Gateway */ public function testExpectedInterface() diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Harvester/OAITest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Harvester/OAITest.php index 4c8a2f80c8f478a572c54ab30bb2282c3f6c056f..842966952b25c08694f76ad321210653a3d149aa 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Harvester/OAITest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Harvester/OAITest.php @@ -228,7 +228,7 @@ class OAITest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Exception + * @expectedException Exception * @expectedExceptionMessage HTTP Error */ public function testHTTPErrorDetection() @@ -246,13 +246,12 @@ class OAITest extends \VuFindTest\Unit\TestCase } /** - * /** * Test that a missing URL throws an exception. * * @return void * - * @expectedException Exception + * @expectedException Exception * @expectedExceptionMessage Missing base URL for test. */ public function testMissingURLThrowsException() 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 9f25152fdf85b57f493b1f8a86b3acb46f780534..8d73bf0c7ff10593da17ecc3f639fcf2401251d4 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\Driver\AbstractBase */ 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 81a869accea834ab827caa20b859a11f63dfb448..cbbd0a9cb532ac3f2e45b59284b19cc36a0f62c5 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\TreeDataSource\AbstractBase */ 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 8ee9d2a435676f896d7a5bcfba483ddc4596ff58..a58a0d4a283b6ddb27ce50c802df111e66237b3a 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\TreeRenderer\AbstractBase */ 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 9afec31252fd6f2fca309a55ba7085a6ca4c8701..7664a4429cfd1caff9369b7c698609cde8be0755 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,7 @@ class ExtendedIniTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\I18n\Exception\InvalidArgumentException + * @expectedException Zend\I18n\Exception\InvalidArgumentException * @expectedExceptionMessage Ini file 'en.ini' not found */ 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 0621f946b5dced28aa285620aa879d5bf87223de..d77535edde45b5deba8a4c95b0e7e33770dad3e6 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 @@ -100,7 +100,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase $this->callMethod($driver, 'getLocalId', ['bad']); $this->assertEquals( 'VuFind\ILS\Driver\MultiBackend: ' - . "Could not find local id in 'bad' using '.'", + . "Could not find local id in 'bad' using '.'", $writer->events[1]['message'] ); } 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 6a14d84f459ef3c49c884e9b0cdce71b3d2d86f9..637fa79461404f17e81836ba0a5c46d3367bf8f1 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\ILS\Driver\DriverInterface */ 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 772f009adde350bbd2e738567e1d4e788a8f6306..6b85de76d846c4ba67ef1d644de28a78eb5324af 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php @@ -63,7 +63,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException VuFind\Exception\Mail + * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Invalid Recipient Email Address */ public function testBadTo() @@ -78,7 +78,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException VuFind\Exception\Mail + * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Invalid Recipient Email Address */ public function testEmptyTo() @@ -93,7 +93,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException VuFind\Exception\Mail + * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Too Many Email Recipients */ public function testTooManyRecipients() @@ -108,7 +108,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException VuFind\Exception\Mail + * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Invalid Sender Email Address */ public function testBadFrom() @@ -123,7 +123,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException VuFind\Exception\Mail + * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Boom */ 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 e8c846ff29200fde53cfac3f7c680f2031865e96..0de39c5890d89e8636d3b73a202f1cdb3c2ee449 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,7 @@ class LoaderTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Exception + * @expectedException Exception * @expectedExceptionMessage Could not load default fail image. */ public function testUtterFailure() @@ -80,9 +80,9 @@ class LoaderTest extends \VuFindTest\Unit\TestCase /** * Get a loader object to test. * - * @param array $config Configuration - * @param ThemeInfo $theme Theme info object (null to create default) - * @param array|bool $mock Array of functions to mock, or false for real object + * @param array $config Configuration + * @param ThemeInfo $theme Theme info object (null to create default) + * @param array|bool $mock Array of functions to mock, or false for real object * * @return void */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/FacetCloudTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/FacetCloudTest.php index d81fc758bae160de0b3e3425eb802dc8a21d64df..3688a29c5009812554179598bb5321290412de32 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/FacetCloudTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/FacetCloudTest.php @@ -49,7 +49,7 @@ class FacetCloudTest extends \VuFindTest\Unit\TestCase $results = $this->getMockResults(); $results->getParams()->expects($this->once())->method('getFacetSettings') ->will($this->returnValue(['limit' => 50])); - $fc = $this->getFacetCloud(null,$results); + $fc = $this->getFacetCloud(null, $results); $this->assertEquals(49, $fc->getFacetLimit()); } 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 7a031823ffc79cfb28e4577483a5ce75b558ff53..025cef558afbe1e75cacf73b26c4b5552871efec 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/PluginManagerTest.php @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Recommend\RecommendInterface */ public function testExpectedInterface() diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/RandomRecommendTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/RandomRecommendTest.php index 591ab795961fdc30e9ae0bd4940145a6c61ca1a8..81d74f25456d6eadf9ba8bf84ab44f1f5632feda 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/RandomRecommendTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/RandomRecommendTest.php @@ -179,9 +179,10 @@ class RandomRecommendTest extends TestCase $paramManager->expects($this->once())->method('get') ->with($this->equalTo("Solr")) - ->will($this->returnValue( - $this->getServiceManager()->get('VuFind\SearchParamsPluginManager') - ->get('Solr') + ->will( + $this->returnValue( + $this->getServiceManager()->get('VuFind\SearchParamsPluginManager') + ->get('Solr') ) ); @@ -225,11 +226,11 @@ class RandomRecommendTest extends TestCase ->will($this->returnValue($records)); $service->expects($this->once())->method('random') - ->with( - $this->equalTo("Solr"), - $this->equalTo($params->getQuery()), - $this->equalTo(10) - )->will($this->returnValue($results)); + ->with( + $this->equalTo("Solr"), + $this->equalTo($params->getQuery()), + $this->equalTo(10) + )->will($this->returnValue($results)); $recommend->setConfig("Solr:10:mixed:retain:20:facet1:value1:facet2:value2"); $recommend->init($params, $request); @@ -263,11 +264,11 @@ class RandomRecommendTest extends TestCase ->will($this->returnValue($records)); $service->expects($this->once())->method('random') - ->with( - $this->equalTo("Solr"), - $this->equalTo($params->getQuery()), - $this->equalTo(10) - )->will($this->returnValue($results)); + ->with( + $this->equalTo("Solr"), + $this->equalTo($params->getQuery()), + $this->equalTo(10) + )->will($this->returnValue($results)); $recommend->setConfig("Solr:10:mixed:retain:0:facet1:value1:facet2:value2"); $recommend->init($params, $request); 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 231ff2a6f47da9fa11fe2f171eb6aacfb73f8b13..8204234ad31f4af629f462b77908aacf0f82d315 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,7 @@ class SideFacetsTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Exception + * @expectedException Exception * @expectedExceptionMessage VuFind\Recommend\SideFacets: hierarchical facet helper unavailable */ public function testMissingHierarchicalFacetHelper() @@ -266,7 +266,7 @@ class SideFacetsTest extends \VuFindTest\Unit\TestCase 'Results' => [ 'format' => 'Format', ], - 'Results_Settings' => ['collapsedFacets' => '*'], + 'Results_Settings' => ['collapsedFacets' => '*'], ]; $filters = [ 'format' => [ 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 3478a91304d5ef867b4aa51054d7db224014e66f..4038b4d82be0046463e07190aef42d23b051cf29 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php @@ -51,7 +51,7 @@ class LoaderTest extends TestCase * * @return void * - * @expectedException VuFind\Exception\RecordMissing + * @expectedException VuFind\Exception\RecordMissing * @expectedExceptionMessage Record VuFind:test does not exist. */ public function testMissingRecord() 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 c8a840fc4c1b1f1680df320cde5b7ec4b139597a..7b808220dd1027939b8003875e6290ba5ec97911 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/PluginManagerTest.php @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\RecordDriver\AbstractBase */ 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 f578c59e4248097753e11738c80ddcd75afa7e47..07a35b79134004e57edc40b3fb5a15a4b663b927 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/PluginManagerTest.php @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\RecordTab\TabInterface */ public function testExpectedInterface() 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 ed598804f01e80f20e592b49efa15b299739e68c..0dad2c7cc84cd032b0448e6e156c85fb2711b70f 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/PluginManagerTest.php @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Related\RelatedInterface */ 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 ce9640c5def73f1bc8e0ce112f195940c1fe2021..cf8f944876e20bb7fb7bc97a1a982ceccd6c82cd 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,7 @@ class CsvReaderTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException \Exception + * @expectedException \Exception * @expectedExceptionMessage Could not find valid data. Details: */ 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 23659e16dfb8fad94ba95596008b1031c8af1689..b377ba97ac9040937f958aea128a56b2a28b4b17 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Resolver\Driver\DriverInterface */ 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 093633390d454b7c47acb2b4ba1056dd459fbb4d..56f375d448dc84e0d2684f8d3605e659548fd07c 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Role\PermissionProvider\PermissionProviderInterface */ public function testExpectedInterface() 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 d2dfe5a17c1a8e02bc03c7c7799399b4fe2dd6d1..b39e0e7ee875be21235873a799e53c6baa9695c9 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,7 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException VuFind\Exception\Mail + * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage badbadbad */ public function testUnexpectedResponse() @@ -114,7 +114,7 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException VuFind\Exception\Mail + * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Problem sending text. */ public function testFailureResponse() @@ -135,7 +135,7 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException VuFind\Exception\Mail + * @expectedException VuFind\Exception\Mail * @expectedExceptionMessage Foo */ 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 ad34a6d08375ceec1a18a238e22fdc84d01abd1e..34405675867fe957f6784f29ebc17e1f17fe998a 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/BackendManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/BackendManagerTest.php @@ -49,7 +49,7 @@ class BackendManagerTest extends TestCase * * @return void * - * @expectedException UnexpectedValueException + * @expectedException UnexpectedValueException * @expectedExceptionMessage Expected backend registry to return object */ public function testGetThrowsOnNonObject() @@ -67,7 +67,7 @@ class BackendManagerTest extends TestCase * * @return void * - * @expectedException UnexpectedValueException + * @expectedException UnexpectedValueException * @expectedExceptionMessage does not implement the expected interface */ 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 e2885ff0446dbadac588e559e54a83a12659c9f1..21d999f9768e17d985de60209cd0839f6c30c464 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Search\Base\Options */ 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 24386016d94f9f8d74e663715131ed6fa0b732cc..7b4190c6ea4a04f5e1a07e40907b01825e06cdec 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Search\Base\Params */ public function testExpectedInterface() 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 cfafe8d6baf50782a01671f55e56bfd34aeb4352..8edb4abf2ed25607cff516d505cf51ff31088872 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 @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Search\Base\Results */ 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 d584e3cdefa8041c9ef1e202501c8aad8ee30caa..7514f6b4a8b66945b12bab51fa587871d5857be7 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 @@ -404,7 +404,7 @@ class SpellingProcessorTest extends TestCase * * @return void * - * @expectedException \Exception + * @expectedException \Exception * @expectedExceptionMessage Unexpected suggestion format; spellcheck.extendedResults must be set to true. */ 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 5bb81dade21ac92e8fad8e6a1611dfb05a0818c8..c95582caa7f6424a0e9f0509f8eca630947a8ec7 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/PluginManagerTest.php @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to Zend\Session\SaveHandler\SaveHandlerInterface */ public function testExpectedInterface() diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Statistics/Driver/PluginManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Statistics/Driver/PluginManagerTest.php index 582311a5c6245921e938450848e042843dc1ccb3..c37093e36f52885a6cc4f462f3d4a46956a5c9c4 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Statistics/Driver/PluginManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Statistics/Driver/PluginManagerTest.php @@ -55,7 +55,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase * * @return void * - * @expectedException Zend\ServiceManager\Exception\RuntimeException + * @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Statistics\Driver\AbstractBase */ public function testExpectedInterface() diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/CitationTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/CitationTest.php index 9c409fe8d8638d8df104f1e2584f8331e00c05f0..bfd33b1a0e30cbe97dac9090d863a0fe77256944 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/CitationTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/CitationTest.php @@ -39,10 +39,11 @@ use VuFind\View\Helper\Root\Citation; */ class CitationTest extends \VuFindTest\Unit\ViewHelperTestCase { - /** Sample citations -- each element of this array contains three elements -- + /** + * Sample citations -- each element of this array contains three elements -- * the raw input data and the expected apa/mla output citations. * - * @var array + * @var array */ protected $citations = [ // @codingStandardsIgnoreStart 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 0139536e0067a789ae42923e7390efecba77b3e7..beaeb3cfeccfca0933305611c7daf8d55375afe2 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 @@ -44,7 +44,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase * * @return void * - * @expectedException Zend\View\Exception\RuntimeException + * @expectedException Zend\View\Exception\RuntimeException * @expectedExceptionMessage Cannot find core.phtml template for record driver: VuFind\RecordDriver\SolrMarc */ public function testMissingTemplate() @@ -451,7 +451,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase * * @return void * - * @expectedException Exception + * @expectedException Exception * @expectedExceptionMessage Invalid URL array. */ public function testGetLinkDetailsFailure() diff --git a/module/VuFindConsole/src/VuFindConsole/Controller/GenerateController.php b/module/VuFindConsole/src/VuFindConsole/Controller/GenerateController.php index 296f8cdc7f820298523e62cd4a3f26c17a0dbc76..01d630a31153708d89dc1a7cc9d94aa85232a964 100644 --- a/module/VuFindConsole/src/VuFindConsole/Controller/GenerateController.php +++ b/module/VuFindConsole/src/VuFindConsole/Controller/GenerateController.php @@ -165,7 +165,7 @@ class GenerateController extends AbstractBase // Write updated configuration $this->writeModuleConfig($configPath, $config); return $this->getSuccessResponse(); - } + } /** * Add a new record route definition diff --git a/module/VuFindConsole/tests/unit-tests/bootstrap.php b/module/VuFindConsole/tests/unit-tests/bootstrap.php index 01e13955adae877f1307278fae7c682d808d9c38..d63f479a605aa5bebb07a6ac2b0a3b9fa9843d98 100644 --- a/module/VuFindConsole/tests/unit-tests/bootstrap.php +++ b/module/VuFindConsole/tests/unit-tests/bootstrap.php @@ -7,7 +7,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @copyright Copyright (C) Villanova University 2011 */ -require_once('Zend/Loader/AutoloaderFactory.php'); +require_once'Zend/Loader/AutoloaderFactory.php'; \Zend\Loader\AutoloaderFactory::factory( [ 'Zend\Loader\StandardAutoloader' => [ diff --git a/module/VuFindSearch/tests/unit-tests/bootstrap.php b/module/VuFindSearch/tests/unit-tests/bootstrap.php index 9ef1e7ad79c700c44ccdaaff14fafe76b2deadb5..a637fdbe3de330880a1d4151f5512e869c1bfd01 100644 --- a/module/VuFindSearch/tests/unit-tests/bootstrap.php +++ b/module/VuFindSearch/tests/unit-tests/bootstrap.php @@ -7,7 +7,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @copyright Copyright (C) Villanova University 2011 */ -require_once('Zend/Loader/AutoloaderFactory.php'); +require_once'Zend/Loader/AutoloaderFactory.php'; \Zend\Loader\AutoloaderFactory::factory( [ 'Zend\Loader\StandardAutoloader' => [ 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 b43e63d4ebee3af631faf6a29fecea0901478ebe..ac2d8b840e8e75c3c6ff5632e1ab8a2446ecc49c 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 @@ -47,7 +47,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. */ public function testConstructorRequiresFactoryFunction() @@ -60,12 +60,16 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ public function testFactoryRequiresArray() { - $factory = new RecordCollectionFactory(function () {}); + $factory = new RecordCollectionFactory( + function () { + + } + ); $factory->factory('bad'); } } \ No newline at end of file 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 93f8861dc60c1c4ca0479a1a4b8c7da80998541d..7c956b1f2d38d72d774f995454504e3974635a46 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 @@ -47,7 +47,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. */ public function testConstructorRequiresValidFactoryFunction() @@ -60,12 +60,16 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ public function testInvalidInput() { - $fact = new RecordCollectionFactory(function () {}); + $fact = new RecordCollectionFactory( + function () { + + } + ); $coll = $fact->factory('garbage'); } } \ No newline at end of file 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 2466e8075e0c0fcb37e956289dfe518cb7ea6ea0..8f5343ee604352fce2f43b5b11721d18404f3079 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 @@ -150,8 +150,8 @@ class BackendTest extends \VuFindTest\Unit\TestCase { $conn = $this->getConnectorMock(['query']); $conn->expects($this->once()) - ->method('query') - ->will($this->throwException(new \Exception())); + ->method('query') + ->will($this->throwException(new \Exception())); $back = new Backend($conn); $back->search(new Query(), 1, 1); } @@ -167,9 +167,9 @@ class BackendTest extends \VuFindTest\Unit\TestCase $expectedParams = ['foo' => 'bar', 'search' => 'baz']; $conn = $this->getConnectorMock(['query']); $conn->expects($this->once()) - ->method('query') - ->with($this->equalTo($expectedParams), $this->equalTo(0), $this->equalTo(10)) - ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); + ->method('query') + ->with($this->equalTo($expectedParams), $this->equalTo(0), $this->equalTo(10)) + ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); $back = new Backend($conn); $back->search(new Query('baz'), 0, 10, $myParams); } @@ -184,14 +184,14 @@ class BackendTest extends \VuFindTest\Unit\TestCase $conn = $this->getConnectorMock(['query']); $expectedParams0 = ['search' => 'baz']; $conn->expects($this->at(0)) - ->method('query') - ->with($this->equalTo($expectedParams0), $this->equalTo(0), $this->equalTo(10)) - ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); + ->method('query') + ->with($this->equalTo($expectedParams0), $this->equalTo(0), $this->equalTo(10)) + ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); $expectedParams1 = ['search' => 'fallback']; $conn->expects($this->at(1)) - ->method('query') - ->with($this->equalTo($expectedParams1), $this->equalTo(0), $this->equalTo(10)) - ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); + ->method('query') + ->with($this->equalTo($expectedParams1), $this->equalTo(0), $this->equalTo(10)) + ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); $back = new Backend($conn, null, 'fallback'); $back->search(new Query('baz'), 0, 10); } 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 8d8bf8c395ff85cb7ea49233d0ca9f8c1213f272..5064ec63e8382b70fc25e0887b431f876d770ed3 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 @@ -60,7 +60,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ 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 4aa672c98bf42c8faca167d42a1291c9165670e6..4c57ff0eb58b5fb007db178bba6cd13b3151db76 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 @@ -139,8 +139,8 @@ class BackendTest extends \VuFindTest\Unit\TestCase { $conn = $this->getConnectorMock(['query']); $conn->expects($this->once()) - ->method('query') - ->will($this->throwException(new \Exception())); + ->method('query') + ->will($this->throwException(new \Exception())); $back = new Backend($conn); $back->search(new Query(), 1, 1); } @@ -156,8 +156,8 @@ class BackendTest extends \VuFindTest\Unit\TestCase { $conn = $this->getConnectorMock(['getRecord']); $conn->expects($this->once()) - ->method('getRecord') - ->will($this->throwException(new \Exception())); + ->method('getRecord') + ->will($this->throwException(new \Exception())); $back = new Backend($conn); $back->retrieve('1234'); } @@ -173,9 +173,9 @@ class BackendTest extends \VuFindTest\Unit\TestCase $expectedParams = ['foo' => 'bar', 'limit' => 10, 'pageNumber' => 1.0, 'query' => [['index' => null, 'lookfor' => 'baz']]]; $conn = $this->getConnectorMock(['query']); $conn->expects($this->once()) - ->method('query') - ->with($this->equalTo('inst-id'), $this->equalTo($expectedParams['query']), $this->equalTo($expectedParams)) - ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); + ->method('query') + ->with($this->equalTo('inst-id'), $this->equalTo($expectedParams['query']), $this->equalTo($expectedParams)) + ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); $back = new Backend($conn); $back->search(new Query('baz'), 0, 10, $myParams); } 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 ef547f0995fcd3ba8f4bad0a03bf026f1c3d74e8..f9c2119925bd7f3f9bb8886751ca54ff2253d21a 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 @@ -47,7 +47,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. */ public function testConstructorRequiresValidFactoryFunction() @@ -60,7 +60,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ 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 229fc629efc4aa33cd74410f2c600f1c32937b07..7125821c1b04a8cfd70f6fcff6f72a215b945257 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 @@ -148,7 +148,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage JSON decoding error: 4 -- bad { */ public function testBadJson() @@ -166,7 +166,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Invalid response writer type: xml */ public function testInjectResponseWriterThrownOnIncompabileResponseWriter() @@ -181,7 +181,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Invalid named list implementation type: bad */ public function testInjectResponseWriterThrownOnIncompabileNamedListSetting() @@ -221,7 +221,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException + * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException * @expectedExceptionMessage Alphabetic Browse index missing. */ public function testRefineAlphaBrowseException() @@ -234,7 +234,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException + * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException * @expectedExceptionMessage Alphabetic Browse index missing. */ public function testRefineAlphaBrowseExceptionWithAltString() @@ -247,7 +247,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException + * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException * @expectedExceptionMessage not a browse error */ 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 07e989a8f792c205e08a3573aceb0364c4f3a88f..3edad67581a63c2580226d89d921ed1de53f444f 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 @@ -114,7 +114,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException InvalidArgumentException + * @expectedException InvalidArgumentException * @expectedExceptionMessage AdapterInterface */ public function testSetAdapterThrowsInvalidObject() diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Document/UpdateDocumentTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Document/UpdateDocumentTest.php index 585e272f34e341ca964085650f358b96b01a4bb4..a8ad2a3db37b9cf82fcc1ef70341a5d1cfdba3d5 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Document/UpdateDocumentTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Document/UpdateDocumentTest.php @@ -52,8 +52,8 @@ class UpdateDocumentTest extends PHPUnit_Framework_TestCase { $record = $this->getMockForAbstractClass('VuFindSearch\Backend\Solr\Record\SerializableRecordInterface'); $record->expects($this->once()) - ->method('getFields') - ->will($this->returnValue(['id' => 'ID', 'field' => 'FIELD'])); + ->method('getFields') + ->will($this->returnValue(['id' => 'ID', 'field' => 'FIELD'])); $document = new UpdateDocument(); $document->addRecord($record, ['boost' => '2.0']); $xml = $document->asXML(); 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 f47d299dba992896f4792a1da381d72dda1903ea..64e3943f2f7b6b1bf2aac44cab4712759eac0cef 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 @@ -51,7 +51,7 @@ class HandlerMapTest extends TestCase * * @return void * - * @expectedException InvalidArgumentException + * @expectedException InvalidArgumentException * @expectedExceptionMessage Duplicate fallback */ public function testSetHandlerMapThrowsOnDuplicateFallback() @@ -68,7 +68,7 @@ class HandlerMapTest extends TestCase * * @return void * - * @expectedException InvalidArgumentException + * @expectedException InvalidArgumentException * @expectedExceptionMessage Handler for function already defined */ public function testSetHandlerMapThrowsOnDuplicateFunctionHandler() @@ -85,7 +85,7 @@ class HandlerMapTest extends TestCase * * @return void * - * @expectedException RuntimeException + * @expectedException RuntimeException * @expectedExceptionMessage Undefined function handler */ public function testGetHandlerThrowsOnUndefinedFunctionHandler() @@ -99,7 +99,7 @@ class HandlerMapTest extends TestCase * * @return void * - * @expectedException InvalidArgumentException + * @expectedException InvalidArgumentException * @expectedExceptionMessage Invalid parameter key: bad */ public function testGetParametersThrowsOnUndefinedType() @@ -113,7 +113,7 @@ class HandlerMapTest extends TestCase * * @return void * - * @expectedException InvalidArgumentException + * @expectedException InvalidArgumentException * @expectedExceptionMessage Invalid parameter key: bad */ 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 79b67b0b4738256be2d5fdbd8d2f2452882c6ffc..94d5da88f5089d48126fb9d3ba04aacafb8d8b71 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 @@ -60,7 +60,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ 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 10b0e0a31771618a9684142bfe3d13533ca5d83f..d7f304c385ce33570e09fd770b590e6917b67b98 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 @@ -128,8 +128,8 @@ class BackendTest extends TestCase $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface'); $conn = $this->getConnectorMock(['getRecord']); $conn->expects($this->once()) - ->method('getRecord') - ->will($this->throwException(new SummonException())); + ->method('getRecord') + ->will($this->throwException(new SummonException())); $back = new Backend($conn, $fact); $back->retrieve('id'); } @@ -180,8 +180,8 @@ class BackendTest extends TestCase $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface'); $conn = $this->getConnectorMock(['query']); $conn->expects($this->once()) - ->method('query') - ->will($this->throwException(new SummonException())); + ->method('query') + ->will($this->throwException(new SummonException())); $back = new Backend($conn, $fact); $back->search(new Query(), 1, 1); } @@ -197,9 +197,9 @@ class BackendTest extends TestCase $expectedParams = new SummonQuery('boo:(baz)', ['pageSize' => 10, 'pageNumber' => 1.0, 'maxTopics' => 32]); $conn = $this->getConnectorMock(['query']); $conn->expects($this->once()) - ->method('query') - ->with($this->equalTo($expectedParams)) - ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); + ->method('query') + ->with($this->equalTo($expectedParams)) + ->will($this->returnValue(['recordCount' => 0, 'documents' => []])); $back = new Backend($conn); $back->search(new Query('baz', 'boo'), 0, 10, $myParams); } 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 36c64088628641cb8ee5e90ccdce942be66b489d..296fdcd9387ed9266859893953841047972b3dec 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 @@ -47,7 +47,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. */ public function testConstructorRequiresFactoryFunction() @@ -60,12 +60,16 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ public function testFactoryRequiresArray() { - $factory = new RecordCollectionFactory(function () {}); + $factory = new RecordCollectionFactory( + function () { + + } + ); $factory->factory('bad'); } } \ No newline at end of file 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 3a800e995d163a12b2828d121de364d5a04899d0..bd5ab0c4f400f724baa21351aa08a0ecd679ff27 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 @@ -46,7 +46,7 @@ class RecordCollectionFactoryTest extends \PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Record factory must be callable. */ public function testBadCallback() @@ -59,7 +59,7 @@ class RecordCollectionFactoryTest extends \PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unexpected type of value: Expected array, got string */ 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 0d591f7c1bd2b6050955309524e91c1957835006..df32e5be9f5d06de3997846dd64df7acf64e43e9 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Query/QueryGroupTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Query/QueryGroupTest.php @@ -123,7 +123,7 @@ class QueryGroupTest extends PHPUnit_Framework_TestCase * * @return void * - * @expectedException VuFindSearch\Exception\InvalidArgumentException + * @expectedException VuFindSearch\Exception\InvalidArgumentException * @expectedExceptionMessage Unknown or invalid boolean operator: fizz */ 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 ace86cb05bbafb7c1ca9e826d98a005aa3e84352..f65158c111878c15dcc62d9cbd6136c7934584f6 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php @@ -85,7 +85,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ public function testRetrieveException() @@ -110,7 +110,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ public function testSearchException() @@ -192,7 +192,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ public function testRetrieveBatchInterfaceException() @@ -225,7 +225,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ public function testRetrieveBatchNoInterfaceException() @@ -263,11 +263,12 @@ class SearchServiceTest extends TestCase $backend->expects($this->once())->method('random') ->with( - $this->equalTo($query), - $this->equalTo("10"), - $this->equalTo($params) - )->will($this->returnValue($response) - ); + $this->equalTo($query), + $this->equalTo("10"), + $this->equalTo($params) + )->will( + $this->returnValue($response) + ); $em = $service->getEventManager(); $em->expects($this->at(0))->method('trigger') ->with($this->equalTo('pre'), $this->equalTo($backend)); @@ -284,7 +285,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ public function testRandomInterfaceWithException() @@ -299,11 +300,11 @@ class SearchServiceTest extends TestCase $query = new Query('test'); $backend->expects($this->once())->method('random') - ->with( - $this->equalTo($query), - $this->equalTo("10"), - $this->equalTo($params) - )->will($this->throwException($exception)); + ->with( + $this->equalTo($query), + $this->equalTo("10"), + $this->equalTo($params) + )->will($this->throwException($exception)); $em = $service->getEventManager(); $em->expects($this->at(0))->method('trigger') @@ -334,12 +335,12 @@ class SearchServiceTest extends TestCase // First Search Grabs 0 records but uses get total method $backend->expects($this->at(0))->method('search') - ->with( - $this->equalTo($query), - $this->equalTo("0"), - $this->equalTo("0"), - $this->equalTo($params) - )->will($this->returnValue($responseForZero)); + ->with( + $this->equalTo($query), + $this->equalTo("0"), + $this->equalTo("0"), + $this->equalTo($params) + )->will($this->returnValue($responseForZero)); $responseForZero->expects($this->once())->method('getTotal') ->will($this->returnValue($total)); @@ -354,8 +355,9 @@ class SearchServiceTest extends TestCase $this->anything(), $this->equalTo("1"), $this->equalTo($params) - )->will($this->returnValue($response) - ); + )->will( + $this->returnValue($response) + ); } $em = $service->getEventManager(); @@ -435,10 +437,10 @@ class SearchServiceTest extends TestCase // Second search grabs all the records and calls shuffle $backend->expects($this->at(1))->method('search') ->with( - $this->equalTo($query), - $this->equalTo("0"), - $this->equalTo($limit), - $this->equalTo($params) + $this->equalTo($query), + $this->equalTo("0"), + $this->equalTo($limit), + $this->equalTo($params) )->will($this->returnValue($response)); $response->expects($this->once())->method('shuffle'); @@ -455,7 +457,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ public function testRandomNoInterfaceWithExceptionAtFirstSearch() @@ -482,7 +484,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ public function testRandomNoInterfaceWithExceptionAtItemSearch() @@ -499,12 +501,12 @@ class SearchServiceTest extends TestCase // First Search Grabs 0 records but uses get total method $backend->expects($this->at(0))->method('search') - ->with( - $this->equalTo($query), - $this->equalTo("0"), - $this->equalTo("0"), - $this->equalTo($params) - )->will($this->returnValue($responseForZero)); + ->with( + $this->equalTo($query), + $this->equalTo("0"), + $this->equalTo("0"), + $this->equalTo($params) + )->will($this->returnValue($responseForZero)); $responseForZero->expects($this->once())->method('getTotal') ->will($this->returnValue($total)); @@ -525,7 +527,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ public function testRandomNoInterfaceExceptionWithLessResultsThanLimit() @@ -543,12 +545,12 @@ class SearchServiceTest extends TestCase // First Search Grabs 0 records but uses get total method $backend->expects($this->at(0))->method('search') - ->with( - $this->equalTo($query), - $this->equalTo("0"), - $this->equalTo("0"), - $this->equalTo($params) - )->will($this->returnValue($responseForZero)); + ->with( + $this->equalTo($query), + $this->equalTo("0"), + $this->equalTo("0"), + $this->equalTo($params) + )->will($this->returnValue($responseForZero)); $responseForZero->expects($this->once())->method('getTotal') ->will($this->returnValue($total)); @@ -598,7 +600,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage foo does not support similar() */ public function testSimilarOnNonSupportingBackend() @@ -613,7 +615,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Backend\Exception\BackendException + * @expectedException VuFindSearch\Backend\Exception\BackendException * @expectedExceptionMessage test */ public function testSimilarException() @@ -644,7 +646,7 @@ class SearchServiceTest extends TestCase * * @return void * - * @expectedException VuFindSearch\Exception\RuntimeException + * @expectedException VuFindSearch\Exception\RuntimeException * @expectedExceptionMessage Unable to resolve backend: retrieve, junk */ public function testFailedResolve() diff --git a/module/VuFindTheme/tests/unit-tests/bootstrap.php b/module/VuFindTheme/tests/unit-tests/bootstrap.php index 1a7694d7214c55b1e5685f9a8fc8a18df2a5af7d..26c6bf5d5ba646336eeba6463ef4da810d777c77 100644 --- a/module/VuFindTheme/tests/unit-tests/bootstrap.php +++ b/module/VuFindTheme/tests/unit-tests/bootstrap.php @@ -7,7 +7,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @copyright Copyright (C) Villanova University 2011 */ -require_once('Zend/Loader/AutoloaderFactory.php'); +require_once 'Zend/Loader/AutoloaderFactory.php'; \Zend\Loader\AutoloaderFactory::factory( [ 'Zend\Loader\StandardAutoloader' => [ diff --git a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php index 73ddb0a16d71d48f022a3488a193a90a24dac390..9d087ae49cd531ae7918c3d77ebc03e53c4169d6 100644 --- a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php +++ b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeInfoTest.php @@ -82,7 +82,7 @@ class ThemeInfoTest extends Unit\TestCase * * @return void * - * @expectedException Exception + * @expectedException Exception * @expectedExceptionMessage Cannot load theme: invalid */ public function testInvalidTheme()