Skip to content

Commit

Permalink
Update doc blocks to FQCN.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Oct 31, 2016
1 parent 5abd21e commit b6e8a99
Show file tree
Hide file tree
Showing 30 changed files with 72 additions and 62 deletions.
10 changes: 5 additions & 5 deletions tests/TestCase/Controller/Component/SecurityComponentTest.php
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Core/ConfigureTest.php
Expand Up @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Database/Type/BoolTypeTest.php
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Database/Type/DecimalTypeTest.php
Expand Up @@ -105,7 +105,7 @@ public function testToDatabase()
/**
* Arrays are invalid.
*
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @return void
*/
public function testToDatabaseInvalid()
Expand Down Expand Up @@ -165,7 +165,7 @@ public function testMarshalWithLocaleParsing()
/**
* Test that exceptions are raised on invalid parsers.
*
* @expectedException RuntimeException
* @expectedException \RuntimeException
* @return void
*/
public function testUseLocaleParsingInvalid()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/Type/FloatTypeTest.php
Expand Up @@ -154,7 +154,7 @@ public function testMarshalWithLocaleParsing()
/**
* Test that exceptions are raised on invalid parsers.
*
* @expectedException RuntimeException
* @expectedException \RuntimeException
* @return void
*/
public function testUseLocaleParsingInvalid()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/Type/IntegerTypeTest.php
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/Type/JsonTypeTest.php
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/Type/StringTypeTest.php
Expand Up @@ -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()
Expand Down
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Http/MiddlewareQueueTest.php
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Http/RunnerTest.php
Expand Up @@ -125,7 +125,7 @@ public function testRunSequencing()
/**
* Test that exceptions bubble up.
*
* @expectedException RuntimeException
* @expectedException \RuntimeException
* @expectedExceptionMessage A bad thing
*/
public function testRunExceptionInMiddleware()
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Http/ServerTest.php
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Mailer/MailerAwareTraitTest.php
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Mailer/MailerTest.php
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/Association/BelongsToManyTest.php
Expand Up @@ -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
*/
Expand Down
7 changes: 6 additions & 1 deletion tests/TestCase/ORM/AssociationTest.php
Expand Up @@ -43,6 +43,11 @@ public function findPublished($query)
class AssociationTest extends TestCase
{

/**
* @var \Cake\ORM\Association|\PHPUnit_Framework_MockObject_MockObject
*/
public $association;

/**
* Set up
*
Expand Down Expand 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()
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/ORM/Behavior/TreeBehaviorTest.php
Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/ORM/MarshallerTest.php
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/QueryRegressionTest.php
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/RulesCheckerIntegrationTest.php
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/TableRegressionTest.php
Expand Up @@ -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()
Expand Down
22 changes: 11 additions & 11 deletions tests/TestCase/Routing/Route/RedirectRouteTest.php
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b6e8a99

Please sign in to comment.