From b6e8a99db6dbc60428ca94385bdac1c494592d3e Mon Sep 17 00:00:00 2001 From: dereuromark Date: Mon, 31 Oct 2016 22:36:57 +0100 Subject: [PATCH] Update doc blocks to FQCN. --- .../Component/SecurityComponentTest.php | 10 ++++----- tests/TestCase/Core/ConfigureTest.php | 2 +- tests/TestCase/Database/QueryTest.php | 4 ++-- tests/TestCase/Database/Type/BoolTypeTest.php | 4 ++-- .../Database/Type/DecimalTypeTest.php | 4 ++-- .../TestCase/Database/Type/FloatTypeTest.php | 2 +- .../Database/Type/IntegerTypeTest.php | 2 +- tests/TestCase/Database/Type/JsonTypeTest.php | 2 +- .../TestCase/Database/Type/StringTypeTest.php | 2 +- .../Middleware/ErrorHandlerMiddlewareTest.php | 2 +- tests/TestCase/Http/MiddlewareQueueTest.php | 2 +- tests/TestCase/Http/RunnerTest.php | 2 +- tests/TestCase/Http/ServerTest.php | 4 ++-- .../TestCase/Mailer/MailerAwareTraitTest.php | 2 +- tests/TestCase/Mailer/MailerTest.php | 2 +- .../ORM/Association/BelongsToManyTest.php | 2 +- tests/TestCase/ORM/AssociationTest.php | 7 +++++- .../ORM/Behavior/TreeBehaviorTest.php | 4 ++-- tests/TestCase/ORM/MarshallerTest.php | 4 ++-- tests/TestCase/ORM/QueryRegressionTest.php | 2 +- .../ORM/RulesCheckerIntegrationTest.php | 2 +- tests/TestCase/ORM/TableRegressionTest.php | 2 +- .../Routing/Route/RedirectRouteTest.php | 22 +++++++++---------- tests/TestCase/Routing/RouterTest.php | 6 ++--- .../TestSuite/IntegrationTestCaseTest.php | 12 +++++----- tests/TestCase/Utility/HashTest.php | 2 +- tests/TestCase/Validation/ValidatorTest.php | 10 ++++----- tests/TestCase/View/HelperRegistryTest.php | 9 ++++++-- tests/TestCase/View/StringTemplateTest.php | 2 +- tests/TestCase/View/ViewTest.php | 2 +- 30 files changed, 72 insertions(+), 62 deletions(-) diff --git a/tests/TestCase/Controller/Component/SecurityComponentTest.php b/tests/TestCase/Controller/Component/SecurityComponentTest.php index ffeee4b07c5..0aa6f18716e 100644 --- a/tests/TestCase/Controller/Component/SecurityComponentTest.php +++ b/tests/TestCase/Controller/Component/SecurityComponentTest.php @@ -1407,7 +1407,7 @@ public function testValidatePostDebugFormat() /** * test blackhole will now throw passed exception if debug enabled * - * @expectedException Cake\Controller\Exception\SecurityException + * @expectedException \Cake\Controller\Exception\SecurityException * @expectedExceptionMessage error description * @return void */ @@ -1535,7 +1535,7 @@ public function testValidatePostUnexpectedDebugToken() * Auth required throws exception token not found * * @return void - * @expectedException Cake\Controller\Exception\AuthSecurityException + * @expectedException \Cake\Controller\Exception\AuthSecurityException * @expectedExceptionMessage '_Token' was not found in request data. * @triggers Controller.startup $this->Controller */ @@ -1551,7 +1551,7 @@ public function testAuthRequiredThrowsExceptionTokenNotFoundPost() * Auth required throws exception token not found in Session * * @return void - * @expectedException Cake\Controller\Exception\AuthSecurityException + * @expectedException \Cake\Controller\Exception\AuthSecurityException * @expectedExceptionMessage '_Token' was not found in session. * @triggers Controller.startup $this->Controller */ @@ -1567,7 +1567,7 @@ public function testAuthRequiredThrowsExceptionTokenNotFoundSession() * Auth required throws exception controller not allowed * * @return void - * @expectedException Cake\Controller\Exception\AuthSecurityException + * @expectedException \Cake\Controller\Exception\AuthSecurityException * @expectedExceptionMessage Controller 'NotAllowed' was not found in allowed controllers: 'Allowed, AnotherAllowed'. * @triggers Controller.startup $this->Controller */ @@ -1587,7 +1587,7 @@ public function testAuthRequiredThrowsExceptionControllerNotAllowed() * Auth required throws exception controller not allowed * * @return void - * @expectedException Cake\Controller\Exception\AuthSecurityException + * @expectedException \Cake\Controller\Exception\AuthSecurityException * @expectedExceptionMessage Action 'NotAllowed::protected' was not found in allowed actions: 'index, view'. * @triggers Controller.startup $this->Controller */ diff --git a/tests/TestCase/Core/ConfigureTest.php b/tests/TestCase/Core/ConfigureTest.php index ae5c3b56b3c..66784f6e0c5 100644 --- a/tests/TestCase/Core/ConfigureTest.php +++ b/tests/TestCase/Core/ConfigureTest.php @@ -82,7 +82,7 @@ public function testReadOrFail() /** * testReadOrFail method * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage Expected configuration key "This.Key.Does.Not.exist" not found * @return void */ diff --git a/tests/TestCase/Database/QueryTest.php b/tests/TestCase/Database/QueryTest.php index 21a91513e5d..058e05a1e6c 100644 --- a/tests/TestCase/Database/QueryTest.php +++ b/tests/TestCase/Database/QueryTest.php @@ -756,7 +756,7 @@ public function testSelectWhereArrayType() * Tests that passing an empty array type to any where condition will not * result in a SQL error, but an internal exception * - * @expectedException Cake\Database\Exception + * @expectedException \Cake\Database\Exception * @expectedExceptionMessage Impossible to generate condition with empty list of values for field * @return void */ @@ -773,7 +773,7 @@ public function testSelectWhereArrayTypeEmpty() /** * Tests exception message for impossible condition when using an expression - * @expectedException Cake\Database\Exception + * @expectedException \Cake\Database\Exception * @expectedExceptionMessage with empty list of values for field (SELECT 1) * @return void */ diff --git a/tests/TestCase/Database/Type/BoolTypeTest.php b/tests/TestCase/Database/Type/BoolTypeTest.php index 7b26676a87d..994ad716e6b 100644 --- a/tests/TestCase/Database/Type/BoolTypeTest.php +++ b/tests/TestCase/Database/Type/BoolTypeTest.php @@ -55,7 +55,7 @@ public function testToDatabase() /** * Test converting an array to boolean results in an exception * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testToDatabaseInvalid() @@ -67,7 +67,7 @@ public function testToDatabaseInvalid() /** * Tests that passing an invalid value will throw an exception * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testToDatabaseInvalidArray() diff --git a/tests/TestCase/Database/Type/DecimalTypeTest.php b/tests/TestCase/Database/Type/DecimalTypeTest.php index 68afd105c2a..d581b7a6780 100644 --- a/tests/TestCase/Database/Type/DecimalTypeTest.php +++ b/tests/TestCase/Database/Type/DecimalTypeTest.php @@ -105,7 +105,7 @@ public function testToDatabase() /** * Arrays are invalid. * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testToDatabaseInvalid() @@ -165,7 +165,7 @@ public function testMarshalWithLocaleParsing() /** * Test that exceptions are raised on invalid parsers. * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @return void */ public function testUseLocaleParsingInvalid() diff --git a/tests/TestCase/Database/Type/FloatTypeTest.php b/tests/TestCase/Database/Type/FloatTypeTest.php index 051019b044d..724bbcbef1c 100644 --- a/tests/TestCase/Database/Type/FloatTypeTest.php +++ b/tests/TestCase/Database/Type/FloatTypeTest.php @@ -154,7 +154,7 @@ public function testMarshalWithLocaleParsing() /** * Test that exceptions are raised on invalid parsers. * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @return void */ public function testUseLocaleParsingInvalid() diff --git a/tests/TestCase/Database/Type/IntegerTypeTest.php b/tests/TestCase/Database/Type/IntegerTypeTest.php index fa780a0b32b..8f7fc340c35 100644 --- a/tests/TestCase/Database/Type/IntegerTypeTest.php +++ b/tests/TestCase/Database/Type/IntegerTypeTest.php @@ -83,7 +83,7 @@ public function testToDatabase() /** * Tests that passing an invalid value will throw an exception * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testToDatabseInvalid() diff --git a/tests/TestCase/Database/Type/JsonTypeTest.php b/tests/TestCase/Database/Type/JsonTypeTest.php index bc418c3b5f7..6845cbb57ad 100644 --- a/tests/TestCase/Database/Type/JsonTypeTest.php +++ b/tests/TestCase/Database/Type/JsonTypeTest.php @@ -64,7 +64,7 @@ public function testToDatabase() /** * Tests that passing an invalid value will throw an exception * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testToDatabaseInvalid() diff --git a/tests/TestCase/Database/Type/StringTypeTest.php b/tests/TestCase/Database/Type/StringTypeTest.php index ed1dddffdcf..4e11a67f1a7 100644 --- a/tests/TestCase/Database/Type/StringTypeTest.php +++ b/tests/TestCase/Database/Type/StringTypeTest.php @@ -69,7 +69,7 @@ public function testToDatabase() /** * Tests that passing an invalid value will throw an exception * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testToDatabaseInvalidArray() diff --git a/tests/TestCase/Error/Middleware/ErrorHandlerMiddlewareTest.php b/tests/TestCase/Error/Middleware/ErrorHandlerMiddlewareTest.php index a9f5611457a..1d62047d130 100644 --- a/tests/TestCase/Error/Middleware/ErrorHandlerMiddlewareTest.php +++ b/tests/TestCase/Error/Middleware/ErrorHandlerMiddlewareTest.php @@ -84,7 +84,7 @@ public function testNoErrorResponse() /** * Test an invalid rendering class. * - * @expectedException Exception + * @expectedException \Exception * @expectedExceptionMessage The 'TotallyInvalid' renderer class could not be found */ public function testInvalidRenderer() diff --git a/tests/TestCase/Http/MiddlewareQueueTest.php b/tests/TestCase/Http/MiddlewareQueueTest.php index 2252eb896aa..1d18fb256ec 100644 --- a/tests/TestCase/Http/MiddlewareQueueTest.php +++ b/tests/TestCase/Http/MiddlewareQueueTest.php @@ -284,7 +284,7 @@ public function testInsertBefore() /** * Test insertBefore an invalid classname * - * @expectedException LogicException + * @expectedException \LogicException * @expectedExceptionMessage No middleware matching 'InvalidClassName' could be found. * @return void */ diff --git a/tests/TestCase/Http/RunnerTest.php b/tests/TestCase/Http/RunnerTest.php index b587958f7e0..d0f365dd068 100644 --- a/tests/TestCase/Http/RunnerTest.php +++ b/tests/TestCase/Http/RunnerTest.php @@ -125,7 +125,7 @@ public function testRunSequencing() /** * Test that exceptions bubble up. * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage A bad thing */ public function testRunExceptionInMiddleware() diff --git a/tests/TestCase/Http/ServerTest.php b/tests/TestCase/Http/ServerTest.php index ac7b2bf04e6..8f084f5ea2e 100644 --- a/tests/TestCase/Http/ServerTest.php +++ b/tests/TestCase/Http/ServerTest.php @@ -136,7 +136,7 @@ public function testRunInvalidProtocol() /** * Test an application failing to build middleware properly * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage The application `middleware` method */ public function testRunWithApplicationNotMakingMiddleware() @@ -163,7 +163,7 @@ public function testRunMultipleMiddlewareSuccess() /** * Test middleware not creating a response. * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage Application did not create a response. Got "Not a response" instead. */ public function testRunMiddlewareNoResponse() diff --git a/tests/TestCase/Mailer/MailerAwareTraitTest.php b/tests/TestCase/Mailer/MailerAwareTraitTest.php index 9ea27b05db3..1d7c6c697c4 100644 --- a/tests/TestCase/Mailer/MailerAwareTraitTest.php +++ b/tests/TestCase/Mailer/MailerAwareTraitTest.php @@ -49,7 +49,7 @@ public function testGetMailer() /** * Test exception thrown by getMailer. * - * @expectedException Cake\Mailer\Exception\MissingMailerException + * @expectedException \Cake\Mailer\Exception\MissingMailerException * @expectedExceptionMessage Mailer class "Test" could not be found. */ public function testGetMailerThrowsException() diff --git a/tests/TestCase/Mailer/MailerTest.php b/tests/TestCase/Mailer/MailerTest.php index dd1c949e0ec..42d1bc50e97 100644 --- a/tests/TestCase/Mailer/MailerTest.php +++ b/tests/TestCase/Mailer/MailerTest.php @@ -165,7 +165,7 @@ public function testDefaultProfileRestoration() } /** - * @expectedException Cake\Mailer\Exception\MissingActionException + * @expectedException \Cake\Mailer\Exception\MissingActionException * @expectedExceptionMessage Mail TestMailer::test() could not be found, or is not accessible. */ public function testMissingActionThrowsException() diff --git a/tests/TestCase/ORM/Association/BelongsToManyTest.php b/tests/TestCase/ORM/Association/BelongsToManyTest.php index 6f245c9e811..c91e0da912e 100644 --- a/tests/TestCase/ORM/Association/BelongsToManyTest.php +++ b/tests/TestCase/ORM/Association/BelongsToManyTest.php @@ -740,7 +740,7 @@ public function emptyProvider() /** * Test that saveAssociated() fails on non-empty, non-iterable value * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Could not save tags, it cannot be traversed * @return void */ diff --git a/tests/TestCase/ORM/AssociationTest.php b/tests/TestCase/ORM/AssociationTest.php index b7069cbc05a..145332ffd46 100644 --- a/tests/TestCase/ORM/AssociationTest.php +++ b/tests/TestCase/ORM/AssociationTest.php @@ -43,6 +43,11 @@ public function findPublished($query) class AssociationTest extends TestCase { + /** + * @var \Cake\ORM\Association|\PHPUnit_Framework_MockObject_MockObject + */ + public $association; + /** * Set up * @@ -328,7 +333,7 @@ public function testProperty() * Test that warning is shown if property name clashes with table field. * * @return void - * @expectedException PHPUnit_Framework_Error_Warning + * @expectedException \PHPUnit_Framework_Error_Warning * @expectedExceptionMessageRegExp /^Association property name "foo" clashes with field of same name of table "test"/ */ public function testPropertyNameClash() diff --git a/tests/TestCase/ORM/Behavior/TreeBehaviorTest.php b/tests/TestCase/ORM/Behavior/TreeBehaviorTest.php index 9d45b0c152e..9d1e273f6c8 100644 --- a/tests/TestCase/ORM/Behavior/TreeBehaviorTest.php +++ b/tests/TestCase/ORM/Behavior/TreeBehaviorTest.php @@ -889,7 +889,7 @@ public function testAddRoot() /** * Tests making a node its own parent as an existing entity * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage Cannot set a node's parent as itself * @return void */ @@ -903,7 +903,7 @@ public function testReParentSelf() /** * Tests making a node its own parent as a new entity. * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage Cannot set a node's parent as itself * @return void */ diff --git a/tests/TestCase/ORM/MarshallerTest.php b/tests/TestCase/ORM/MarshallerTest.php index d47085ef44f..741a31e2769 100644 --- a/tests/TestCase/ORM/MarshallerTest.php +++ b/tests/TestCase/ORM/MarshallerTest.php @@ -326,7 +326,7 @@ public function testOneAccessibleFieldsOption() /** * Test one() with an invalid association * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Cannot marshal data for "Derp" association. It is not associated with "Articles". * @return void */ @@ -1394,7 +1394,7 @@ public function testMergeWhitelist() /** * Test merge() with an invalid association * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Cannot marshal data for "Derp" association. It is not associated with "Articles". * @return void */ diff --git a/tests/TestCase/ORM/QueryRegressionTest.php b/tests/TestCase/ORM/QueryRegressionTest.php index 0888f1c0c39..cf70765ba83 100644 --- a/tests/TestCase/ORM/QueryRegressionTest.php +++ b/tests/TestCase/ORM/QueryRegressionTest.php @@ -861,7 +861,7 @@ public function testFindMatchingOverwrite2() * Tests that trying to contain an inexistent association * throws an exception and not a fatal error. * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testQueryNotFatalError() diff --git a/tests/TestCase/ORM/RulesCheckerIntegrationTest.php b/tests/TestCase/ORM/RulesCheckerIntegrationTest.php index 581d5324240..fc90ff11bb0 100644 --- a/tests/TestCase/ORM/RulesCheckerIntegrationTest.php +++ b/tests/TestCase/ORM/RulesCheckerIntegrationTest.php @@ -633,7 +633,7 @@ public function testExistsInWithBindingKey() * Tests existsIn with invalid associations * * @group save - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage ExistsIn rule for 'author_id' is invalid. 'NotValid' is not associated with 'Cake\ORM\Table'. * @return void */ diff --git a/tests/TestCase/ORM/TableRegressionTest.php b/tests/TestCase/ORM/TableRegressionTest.php index 1de026d4e3f..59c439221a4 100644 --- a/tests/TestCase/ORM/TableRegressionTest.php +++ b/tests/TestCase/ORM/TableRegressionTest.php @@ -51,7 +51,7 @@ public function tearDown() * in the afterSave callback * * @see https://github.com/cakephp/cakephp/issues/9079 - * @expectedException Cake\ORM\Exception\RolledbackTransactionException + * @expectedException \Cake\ORM\Exception\RolledbackTransactionException * @return void */ public function testAfterSaveRollbackTransaction() diff --git a/tests/TestCase/Routing/Route/RedirectRouteTest.php b/tests/TestCase/Routing/Route/RedirectRouteTest.php index 147daac9ec2..ecaef92ff10 100644 --- a/tests/TestCase/Routing/Route/RedirectRouteTest.php +++ b/tests/TestCase/Routing/Route/RedirectRouteTest.php @@ -65,7 +65,7 @@ public function testParseMiss() /** * test the parsing of routes. * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/posts * @expectedExceptionCode 301 * @return void @@ -79,7 +79,7 @@ public function testParseSimple() /** * test the parsing of routes. * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/posts * @expectedExceptionCode 301 * @return void @@ -93,7 +93,7 @@ public function testParseRedirectOption() /** * test the parsing of routes. * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/posts * @expectedExceptionCode 301 * @return void @@ -107,7 +107,7 @@ public function testParseArray() /** * test redirecting to an external url * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://google.com * @expectedExceptionCode 301 * @return void @@ -121,7 +121,7 @@ public function testParseAbsolute() /** * test redirecting with a status code * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/posts/view * @expectedExceptionCode 302 * @return void @@ -135,7 +135,7 @@ public function testParseStatusCode() /** * test redirecting with the persist option * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/posts/view/2 * @expectedExceptionCode 301 * @return void @@ -149,7 +149,7 @@ public function testParsePersist() /** * test redirecting with persist and string target URLs * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/test * @expectedExceptionCode 301 * @return void @@ -163,7 +163,7 @@ public function testParsePersistStringUrl() /** * test redirecting with persist and passed args * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/tags/add/passme * @expectedExceptionCode 301 * @return void @@ -177,7 +177,7 @@ public function testParsePersistPassedArgs() /** * test redirecting without persist and passed args * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/tags/add * @expectedExceptionCode 301 * @return void @@ -191,7 +191,7 @@ public function testParseNoPersistPassedArgs() /** * test redirecting with patterns * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/tags/add?lang=nl * @expectedExceptionCode 301 * @return void @@ -205,7 +205,7 @@ public function testParsePersistPatterns() /** * test redirecting with patterns and a routed target * - * @expectedException Cake\Routing\Exception\RedirectException + * @expectedException \Cake\Routing\Exception\RedirectException * @expectedExceptionMessage http://localhost/nl/preferred_controllers * @expectedExceptionCode 301 * @return void diff --git a/tests/TestCase/Routing/RouterTest.php b/tests/TestCase/Routing/RouterTest.php index b27859f980b..9ee018fc4dd 100644 --- a/tests/TestCase/Routing/RouterTest.php +++ b/tests/TestCase/Routing/RouterTest.php @@ -37,7 +37,7 @@ public function setUp() { parent::setUp(); Configure::write('Routing', ['admin' => null, 'prefixes' => []]); - Router::fullbaseUrl(''); + Router::fullBaseUrl(''); Configure::write('App.fullBaseUrl', 'http://localhost'); } @@ -73,7 +73,7 @@ public function testbaseUrl() */ public function testfullBaseURL() { - Router::fullbaseUrl('http://example.com'); + Router::fullBaseUrl('http://example.com'); $this->assertEquals('http://example.com/', Router::url('/', true)); $this->assertEquals('http://example.com', Configure::read('App.fullBaseUrl')); Router::fullBaseUrl('https://example.com'); @@ -3210,7 +3210,7 @@ public function testSetRequestContextPsr() /** * Test setting the request context. * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testSetRequestContextInvalid() diff --git a/tests/TestCase/TestSuite/IntegrationTestCaseTest.php b/tests/TestCase/TestSuite/IntegrationTestCaseTest.php index 4eb422a9464..126583e39ae 100644 --- a/tests/TestCase/TestSuite/IntegrationTestCaseTest.php +++ b/tests/TestCase/TestSuite/IntegrationTestCaseTest.php @@ -185,7 +185,7 @@ public function testGet() /** * Test customizing the app class. * - * @expectedException LogicException + * @expectedException \LogicException * @expectedExceptionMessage Cannot load "TestApp\MissingApp" for use in integration * @return void */ @@ -390,7 +390,7 @@ public function testFlashSessionAndCookieAssertsHttpServer() /** * Tests the failure message for assertCookieNotSet * - * @expectedException PHPUnit_Framework_AssertionFailedError + * @expectedException \PHPUnit_Framework_AssertionFailedError * @expectedExceptionMessage Cookie 'remember_me' has been set * @return void */ @@ -404,7 +404,7 @@ public function testCookieNotSetFailure() * Tests the failure message for assertCookieNotSet when no * response whas generated * - * @expectedException PHPUnit_Framework_AssertionFailedError + * @expectedException \PHPUnit_Framework_AssertionFailedError * @expectedExceptionMessage No response set, cannot assert cookies. * @return void */ @@ -523,7 +523,7 @@ public function testWithExpectedExceptionHttpServer() /** * Test that exceptions being thrown are handled correctly. * - * @expectedException PHPUnit_Framework_AssertionFailedError + * @expectedException \PHPUnit_Framework_AssertionFailedError * @return void */ public function testWithUnexpectedException() @@ -799,7 +799,7 @@ public function testSendFileHttpServer() /** * Test that assertFile requires a response * - * @expectedException PHPUnit_Framework_AssertionFailedError + * @expectedException \PHPUnit_Framework_AssertionFailedError * @expectedExceptionMessage No response set, cannot assert file * @return void */ @@ -811,7 +811,7 @@ public function testAssertFileNoReponse() /** * Test that assertFile requires a file * - * @expectedException PHPUnit_Framework_AssertionFailedError + * @expectedException \PHPUnit_Framework_AssertionFailedError * @expectedExceptionMessage No file was sent in this response * @return void */ diff --git a/tests/TestCase/Utility/HashTest.php b/tests/TestCase/Utility/HashTest.php index 005088ccc6b..70edcedc520 100644 --- a/tests/TestCase/Utility/HashTest.php +++ b/tests/TestCase/Utility/HashTest.php @@ -917,7 +917,7 @@ public function testNumeric() /** * Test passing invalid argument type * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid data type, must be an array or \ArrayAccess instance. * @return void */ diff --git a/tests/TestCase/Validation/ValidatorTest.php b/tests/TestCase/Validation/ValidatorTest.php index 1abea8d3b4f..1dc93900316 100644 --- a/tests/TestCase/Validation/ValidatorTest.php +++ b/tests/TestCase/Validation/ValidatorTest.php @@ -221,7 +221,7 @@ public function testRequirePresenceAsArray() /** * Tests the requirePresence failure case * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testRequirePresenceAsArrayFailure() @@ -599,7 +599,7 @@ public function testAllowEmptyAsArray() /** * Tests the allowEmpty failure case * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testAllowEmptyAsArrayFailure() @@ -678,7 +678,7 @@ public function testNotEmptyAsArray() /** * Tests the notEmpty failure case * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testNotEmptyAsArrayFailure() @@ -1301,7 +1301,7 @@ public function testLengthBetween() /** * Tests the lengthBetween proxy method * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testLengthBetweenFailure() @@ -1587,7 +1587,7 @@ public function testRange() /** * Tests the range failure case * - * @expectedException InvalidArgumentException + * @expectedException \InvalidArgumentException * @return void */ public function testRangeFailure() diff --git a/tests/TestCase/View/HelperRegistryTest.php b/tests/TestCase/View/HelperRegistryTest.php index 7f98b200f02..d61b3883f8d 100644 --- a/tests/TestCase/View/HelperRegistryTest.php +++ b/tests/TestCase/View/HelperRegistryTest.php @@ -38,6 +38,11 @@ public function afterRender($viewFile) class HelperRegistryTest extends TestCase { + /** + * @var \Cake\View\HelperRegistry + */ + public $Helpers; + /** * setUp * @@ -308,7 +313,7 @@ public function testLoadMultipleTimesDefaultConfigValuesWorks() /** * Loading a helper with different config, should throw an exception * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage The "Html" alias has already been loaded with the following * @return void */ @@ -321,7 +326,7 @@ public function testLoadMultipleTimesDifferentConfigured() /** * Loading a helper with different config, should throw an exception * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage The "Html" alias has already been loaded with the following * @return void */ diff --git a/tests/TestCase/View/StringTemplateTest.php b/tests/TestCase/View/StringTemplateTest.php index 82dbdf20e0d..aa2b8b8a372 100644 --- a/tests/TestCase/View/StringTemplateTest.php +++ b/tests/TestCase/View/StringTemplateTest.php @@ -142,7 +142,7 @@ public function testFormatArrayData() /** * Test formatting a missing template. * - * @expectedException RuntimeException + * @expectedException \RuntimeException * @expectedExceptionMessage Cannot find template named 'missing' * @return void */ diff --git a/tests/TestCase/View/ViewTest.php b/tests/TestCase/View/ViewTest.php index f75f1c3dfe5..d662b0d1412 100644 --- a/tests/TestCase/View/ViewTest.php +++ b/tests/TestCase/View/ViewTest.php @@ -401,7 +401,7 @@ public function testPluginGetTemplate() * Test that plugin files with absolute file paths are scoped * to the plugin and do now allow any file path. * - * @expectedException Cake\View\Exception\MissingTemplateException + * @expectedException \Cake\View\Exception\MissingTemplateException * @return void */ public function testPluginGetTemplateAbsoluteFail()