Skip to content
Snippets Groups Projects
Commit caf31dd2 authored by Demian Katz's avatar Demian Katz
Browse files

Standardized style for @expectedException.

parent 672e3812
Branches
Tags
No related merge requests found
Showing
with 35 additions and 0 deletions
...@@ -45,6 +45,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase ...@@ -45,6 +45,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase
* Test config validation * Test config validation
* *
* @return void * @return void
*
* @expectedException \VuFind\Exception\Auth * @expectedException \VuFind\Exception\Auth
* @expectedExceptionMessage One or more ChoiceAuth parameters are missing. * @expectedExceptionMessage One or more ChoiceAuth parameters are missing.
*/ */
...@@ -58,6 +59,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase ...@@ -58,6 +59,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase
* Test default getPluginManager behavior * Test default getPluginManager behavior
* *
* @return void * @return void
*
* @expectedException \Exception * @expectedException \Exception
* @expectedExceptionMessage Plugin manager missing. * @expectedExceptionMessage Plugin manager missing.
*/ */
...@@ -174,6 +176,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase ...@@ -174,6 +176,7 @@ class ChoiceAuthTest extends \VuFindTest\Unit\TestCase
* Test an illegal auth method * Test an illegal auth method
* *
* @return void * @return void
*
* @expectedException \Exception * @expectedException \Exception
* @expectedExceptionMessage Illegal setting: foo * @expectedExceptionMessage Illegal setting: foo
*/ */
......
...@@ -43,6 +43,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase ...@@ -43,6 +43,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase
* Test validation of empty create request. * Test validation of empty create request.
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Auth * @expectedException VuFind\Exception\Auth
* @expectedExceptionMessage Username cannot be blank * @expectedExceptionMessage Username cannot be blank
*/ */
...@@ -56,6 +57,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase ...@@ -56,6 +57,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase
* Test validation of create request w/blank password. * Test validation of create request w/blank password.
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Auth * @expectedException VuFind\Exception\Auth
* @expectedExceptionMessage Password cannot be blank * @expectedExceptionMessage Password cannot be blank
*/ */
...@@ -71,6 +73,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase ...@@ -71,6 +73,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase
* Test validation of create request w/mismatched passwords. * Test validation of create request w/mismatched passwords.
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Auth * @expectedException VuFind\Exception\Auth
* @expectedExceptionMessage Passwords do not match * @expectedExceptionMessage Passwords do not match
*/ */
...@@ -86,6 +89,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase ...@@ -86,6 +89,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase
* Test missing table manager. * Test missing table manager.
* *
* @return void * @return void
*
* @expectedException Exception * @expectedException Exception
* @expectedExceptionMessage DB table manager missing. * @expectedExceptionMessage DB table manager missing.
*/ */
...@@ -99,6 +103,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase ...@@ -99,6 +103,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase
* Test creation w/duplicate email. * Test creation w/duplicate email.
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Auth * @expectedException VuFind\Exception\Auth
* @expectedExceptionMessage That email address is already used * @expectedExceptionMessage That email address is already used
*/ */
...@@ -124,6 +129,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase ...@@ -124,6 +129,7 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase
* Test creation w/duplicate username. * Test creation w/duplicate username.
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Auth * @expectedException VuFind\Exception\Auth
* @expectedExceptionMessage That username is already taken * @expectedExceptionMessage That username is already taken
*/ */
......
...@@ -195,6 +195,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase ...@@ -195,6 +195,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase
* Test security features of switching between auth options (part 2). * Test security features of switching between auth options (part 2).
* *
* @return void * @return void
*
* @expectedException \Exception * @expectedException \Exception
* @expectedExceptionMessage Illegal authentication method: MultiILS * @expectedExceptionMessage Illegal authentication method: MultiILS
*/ */
...@@ -332,6 +333,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase ...@@ -332,6 +333,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase
* Test unsuccessful login (\VuFind\Exception\PasswordSecurity) * Test unsuccessful login (\VuFind\Exception\PasswordSecurity)
* *
* @return void * @return void
*
* @expectedException \VuFind\Exception\PasswordSecurity * @expectedException \VuFind\Exception\PasswordSecurity
* @expectedExceptionMessage Boom * @expectedExceptionMessage Boom
*/ */
...@@ -350,6 +352,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase ...@@ -350,6 +352,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase
* Test unsuccessful login (\VuFind\Exception\Auth) * Test unsuccessful login (\VuFind\Exception\Auth)
* *
* @return void * @return void
*
* @expectedException \VuFind\Exception\Auth * @expectedException \VuFind\Exception\Auth
* @expectedExceptionMessage Blam * @expectedExceptionMessage Blam
*/ */
...@@ -368,6 +371,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase ...@@ -368,6 +371,7 @@ class ManagerTest extends \VuFindTest\Unit\TestCase
* Test that unexpected exceptions get mapped to technical errors. * Test that unexpected exceptions get mapped to technical errors.
* *
* @return void * @return void
*
* @expectedException \VuFind\Exception\Auth * @expectedException \VuFind\Exception\Auth
* @expectedExceptionMessage authentication_error_technical * @expectedExceptionMessage authentication_error_technical
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Auth\AbstractBase * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Auth\AbstractBase
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Autocomplete\AutocompleteInterface * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Autocomplete\AutocompleteInterface
*/ */
......
...@@ -43,6 +43,7 @@ class TagTest extends \VuFindTest\Unit\DbTestCase ...@@ -43,6 +43,7 @@ class TagTest extends \VuFindTest\Unit\DbTestCase
* Test that missing plugin manager causes exception. * Test that missing plugin manager causes exception.
* *
* @return void * @return void
*
* @expectedException Exception * @expectedException Exception
* @expectedExceptionMessage DB table manager missing. * @expectedExceptionMessage DB table manager missing.
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractCover * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractCover
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\Loader * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\Loader
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Content\AbstractBase
*/ */
......
...@@ -53,6 +53,7 @@ class LoaderTest extends \VuFindTest\Unit\TestCase ...@@ -53,6 +53,7 @@ class LoaderTest extends \VuFindTest\Unit\TestCase
* Test that failure to load even the baseline image causes an exception. * Test that failure to load even the baseline image causes an exception.
* *
* @return void * @return void
*
* @expectedException Exception * @expectedException Exception
* @expectedExceptionMessage Could not load default fail image. * @expectedExceptionMessage Could not load default fail image.
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Db\Table\Gateway * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Db\Table\Gateway
*/ */
......
...@@ -227,6 +227,7 @@ class OAITest extends \VuFindTest\Unit\TestCase ...@@ -227,6 +227,7 @@ class OAITest extends \VuFindTest\Unit\TestCase
* Test HTTP error detection. * Test HTTP error detection.
* *
* @return void * @return void
*
* @expectedException Exception * @expectedException Exception
* @expectedExceptionMessage HTTP Error * @expectedExceptionMessage HTTP Error
*/ */
...@@ -250,6 +251,7 @@ class OAITest extends \VuFindTest\Unit\TestCase ...@@ -250,6 +251,7 @@ class OAITest extends \VuFindTest\Unit\TestCase
* Test that a missing URL throws an exception. * Test that a missing URL throws an exception.
* *
* @return void * @return void
*
* @expectedException Exception * @expectedException Exception
* @expectedExceptionMessage Missing base URL for test. * @expectedExceptionMessage Missing base URL for test.
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\Driver\AbstractBase * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\Driver\AbstractBase
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\TreeDataSource\AbstractBase * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\TreeDataSource\AbstractBase
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\TreeRenderer\AbstractBase * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\Hierarchy\TreeRenderer\AbstractBase
*/ */
......
...@@ -156,6 +156,7 @@ class ExtendedIniTest extends \VuFindTest\Unit\TestCase ...@@ -156,6 +156,7 @@ class ExtendedIniTest extends \VuFindTest\Unit\TestCase
* Test missing path stack. * Test missing path stack.
* *
* @return void * @return void
*
* @expectedException Zend\I18n\Exception\InvalidArgumentException * @expectedException Zend\I18n\Exception\InvalidArgumentException
* @expectedExceptionMessage Ini file 'en.ini' not found * @expectedExceptionMessage Ini file 'en.ini' not found
*/ */
......
...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase ...@@ -54,6 +54,7 @@ class PluginManagerTest extends \VuFindTest\Unit\TestCase
* Test expected interface. * Test expected interface.
* *
* @return void * @return void
*
* @expectedException Zend\ServiceManager\Exception\RuntimeException * @expectedException Zend\ServiceManager\Exception\RuntimeException
* @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\ILS\Driver\DriverInterface * @expectedExceptionMessage Plugin ArrayObject does not belong to VuFind\ILS\Driver\DriverInterface
*/ */
......
...@@ -62,6 +62,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase ...@@ -62,6 +62,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
* Test bad to address. * Test bad to address.
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Mail * @expectedException VuFind\Exception\Mail
* @expectedExceptionMessage Invalid Recipient Email Address * @expectedExceptionMessage Invalid Recipient Email Address
*/ */
...@@ -76,6 +77,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase ...@@ -76,6 +77,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
* Test empty to address. * Test empty to address.
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Mail * @expectedException VuFind\Exception\Mail
* @expectedExceptionMessage Invalid Recipient Email Address * @expectedExceptionMessage Invalid Recipient Email Address
*/ */
...@@ -90,6 +92,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase ...@@ -90,6 +92,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
* Test that we only accept one recipient by default * Test that we only accept one recipient by default
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Mail * @expectedException VuFind\Exception\Mail
* @expectedExceptionMessage Too Many Email Recipients * @expectedExceptionMessage Too Many Email Recipients
*/ */
...@@ -104,6 +107,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase ...@@ -104,6 +107,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
* Test bad from address. * Test bad from address.
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Mail * @expectedException VuFind\Exception\Mail
* @expectedExceptionMessage Invalid Sender Email Address * @expectedExceptionMessage Invalid Sender Email Address
*/ */
...@@ -118,6 +122,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase ...@@ -118,6 +122,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
* Test transport exception. * Test transport exception.
* *
* @return void * @return void
*
* @expectedException VuFind\Exception\Mail * @expectedException VuFind\Exception\Mail
* @expectedExceptionMessage Boom * @expectedExceptionMessage Boom
*/ */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment