diff --git a/lib/Cake/Test/TestCase/Controller/ComponentRegistryTest.php b/lib/Cake/Test/TestCase/Controller/ComponentRegistryTest.php index 26032d04ac5..3e06f74639e 100644 --- a/lib/Cake/Test/TestCase/Controller/ComponentRegistryTest.php +++ b/lib/Cake/Test/TestCase/Controller/ComponentRegistryTest.php @@ -14,8 +14,8 @@ */ namespace Cake\Test\TestCase\Controller; -use Cake\Controller\Component\CookieComponent; use Cake\Controller\ComponentRegistry; +use Cake\Controller\Component\CookieComponent; use Cake\Controller\Controller; use Cake\Core\App; use Cake\Core\Plugin; diff --git a/lib/Cake/Test/TestCase/Database/QueryTest.php b/lib/Cake/Test/TestCase/Database/QueryTest.php index f2315a8698e..ff458fd9b28 100644 --- a/lib/Cake/Test/TestCase/Database/QueryTest.php +++ b/lib/Cake/Test/TestCase/Database/QueryTest.php @@ -1932,7 +1932,7 @@ public function testBind() { ->from('comments') ->where(['created BETWEEN :foo AND :bar']) ->bind(':foo', '2007-03-18 10:50:00') - ->bind(':bar','2007-03-18 10:52:00') + ->bind(':bar', '2007-03-18 10:52:00') ->execute(); $this->assertEquals($expected, $results->fetchAll('assoc')); } diff --git a/lib/Cake/Test/TestCase/ORM/BufferedResultSetTest.php b/lib/Cake/Test/TestCase/ORM/BufferedResultSetTest.php index 265fde0d93f..cbda9e4cae0 100644 --- a/lib/Cake/Test/TestCase/ORM/BufferedResultSetTest.php +++ b/lib/Cake/Test/TestCase/ORM/BufferedResultSetTest.php @@ -18,8 +18,8 @@ use Cake\Core\Configure; use Cake\Model\ConnectionManager; -use Cake\ORM\Query; use Cake\ORM\BufferedResultSet; +use Cake\ORM\Query; use Cake\ORM\Table; use Cake\TestSuite\TestCase; diff --git a/lib/Cake/Test/TestCase/ORM/QueryTest.php b/lib/Cake/Test/TestCase/ORM/QueryTest.php index 9f74686dda5..1d3fb4f0217 100644 --- a/lib/Cake/Test/TestCase/ORM/QueryTest.php +++ b/lib/Cake/Test/TestCase/ORM/QueryTest.php @@ -460,7 +460,7 @@ public function testHasManyEagerLoadingDeep($strategy) { 'author_id' => 1, 'body' => 'First Article Body', 'published' => 'Y', - 'author' => ['id' => 1 , 'name' => 'mariano'] + 'author' => ['id' => 1, 'name' => 'mariano'] ], [ 'id' => 3, diff --git a/lib/Cake/Test/TestCase/Utility/StringTest.php b/lib/Cake/Test/TestCase/Utility/StringTest.php index 77603dbb07e..af671a48596 100644 --- a/lib/Cake/Test/TestCase/Utility/StringTest.php +++ b/lib/Cake/Test/TestCase/Utility/StringTest.php @@ -182,7 +182,7 @@ public function testInsert() { $expected = "this is a long string with a few? params you know"; $this->assertEquals($expected, $result); - $result = String::insert('update saved_urls set url = :url where id = :id', array('url' => 'http://www.testurl.com/param1:url/param2:id','id' => 1)); + $result = String::insert('update saved_urls set url = :url where id = :id', array('url' => 'http://www.testurl.com/param1:url/param2:id', 'id' => 1)); $expected = "update saved_urls set url = http://www.testurl.com/param1:url/param2:id where id = 1"; $this->assertEquals($expected, $result); diff --git a/lib/Cake/TestSuite/Fixture/FixtureInjector.php b/lib/Cake/TestSuite/Fixture/FixtureInjector.php index c2456347be2..75e7244897e 100644 --- a/lib/Cake/TestSuite/Fixture/FixtureInjector.php +++ b/lib/Cake/TestSuite/Fixture/FixtureInjector.php @@ -16,13 +16,13 @@ */ namespace Cake\TestSuite\Fixture; +use Cake\TestSuite\TestCase; +use Cake\TestSuite\Fixture\FixtureManager; use \Exception; use \PHPUnit_Framework_AssertionFailedError; use \PHPUnit_Framework_Test; use \PHPUnit_Framework_TestSuite; use \PHPUnit_Framework_TestListener; -use Cake\TestSuite\TestCase; -use Cake\TestSuite\Fixture\FixtureManager; /** * Test listener used to inject a fixture manager in all tests that diff --git a/lib/Cake/TestSuite/Fixture/FixtureManager.php b/lib/Cake/TestSuite/Fixture/FixtureManager.php index a26f6fa138d..b05dc7a8cd5 100644 --- a/lib/Cake/TestSuite/Fixture/FixtureManager.php +++ b/lib/Cake/TestSuite/Fixture/FixtureManager.php @@ -184,6 +184,7 @@ protected function _setupTable(TestFixture $fixture, Connection $db = null, $dro * * @param Cake\TestSuite\TestCase $test the test to inspect for fixture loading * @return void + * @throws Cake\Error\Exception When fixture records cannot be inserted. */ public function load(TestCase $test) { if (empty($test->fixtures)) { diff --git a/lib/Cake/TestSuite/TestCase.php b/lib/Cake/TestSuite/TestCase.php index fe4f288e75b..fc42d48bc11 100644 --- a/lib/Cake/TestSuite/TestCase.php +++ b/lib/Cake/TestSuite/TestCase.php @@ -694,7 +694,7 @@ protected function skipUnless($condition, $message = '') { * @param string $model * @param mixed $methods * @param array $config - * @throws MissingModelException + * @throws Cake\Error\MissingModelException * @return Model */ public function getMockForModel($model, $methods = array(), $config = array()) { diff --git a/lib/Cake/Utility/Security.php b/lib/Cake/Utility/Security.php index 3c909f6fbff..b31b3ecd5cb 100644 --- a/lib/Cake/Utility/Security.php +++ b/lib/Cake/Utility/Security.php @@ -156,6 +156,7 @@ public static function setHash($hash) { * * @param integer $cost Valid values are 4-31 * @return void + * @throws Cake\Error\Exception When cost is invalid. */ public static function setCost($cost) { if ($cost < 4 || $cost > 31) { diff --git a/lib/Cake/Utility/Time.php b/lib/Cake/Utility/Time.php index 892658d064f..444e9639589 100644 --- a/lib/Cake/Utility/Time.php +++ b/lib/Cake/Utility/Time.php @@ -554,7 +554,7 @@ public static function isThisYear($dateString, $timezone = null) { public static function wasYesterday($dateString, $timezone = null) { $timestamp = static::fromString($dateString, $timezone); $yesterday = static::fromString('yesterday', $timezone); - return date('Y-m-d', $timestamp) == date('Y-m-d',$yesterday); + return date('Y-m-d', $timestamp) == date('Y-m-d', $yesterday); } /**