Skip to content

Commit

Permalink
Merge pull request #8370 from cakephp/namespace-cleanup
Browse files Browse the repository at this point in the history
3.2 import cleanup in test suite
  • Loading branch information
lorenzo committed Feb 27, 2016
2 parents b615cb1 + 2b70af9 commit 94e84db
Show file tree
Hide file tree
Showing 102 changed files with 3 additions and 177 deletions.
2 changes: 1 addition & 1 deletion src/I18n/RelativeTimeFormatter.php
Expand Up @@ -303,7 +303,7 @@ public function dateAgoInWords(DatetimeInterface $date, array $options = [])
}

$diffData = $this->_diffData($futureTime, $pastTime, $backwards, $options);
list($fNum, $fWord, $years, $months, $weeks, $days, $hours, $minutes, $seconds) = array_values($diffData);
list($fNum, $fWord, $years, $months, $weeks, $days) = array_values($diffData);

$relativeDate = [];
if ($fNum >= 1 && $years > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Socket.php
Expand Up @@ -324,7 +324,7 @@ public function write($data)
}
}
$totalBytes = strlen($data);
for ($written = 0, $rv = 0; $written < $totalBytes; $written += $rv) {
for ($written = 0; $written < $totalBytes; $written += $rv) {
$rv = fwrite($this->connection, substr($data, $written));
if ($rv === false || $rv === 0) {
return $written;
Expand Down
1 change: 0 additions & 1 deletion src/ORM/Query.php
Expand Up @@ -977,7 +977,6 @@ protected function _addDefaultFields()
protected function _addDefaultSelectTypes()
{
$typeMap = $this->typeMap()->defaults();
$selectTypeMap = $this->selectTypeMap();
$select = $this->clause('select');
$types = [];

Expand Down
1 change: 0 additions & 1 deletion src/TestSuite/TestCase.php
Expand Up @@ -481,7 +481,6 @@ protected function _assertAttributes($assertions, $string, $fullDebug = false, $
{
$asserts = $assertions['attrs'];
$explains = $assertions['explains'];
$len = count($asserts);
do {
$matches = false;
foreach ($asserts as $j => $assert) {
Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Auth/BasicAuthenticateTest.php
Expand Up @@ -18,10 +18,8 @@
use Cake\I18n\Time;
use Cake\Network\Exception\UnauthorizedException;
use Cake\Network\Request;
use Cake\ORM\Entity;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Utility\Security;

/**
* Test case for BasicAuthentication
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Auth/DigestAuthenticateTest.php
Expand Up @@ -20,7 +20,6 @@
use Cake\I18n\Time;
use Cake\Network\Exception\UnauthorizedException;
use Cake\Network\Request;
use Cake\ORM\Entity;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;

Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Auth/FormAuthenticateTest.php
Expand Up @@ -15,8 +15,6 @@
namespace Cake\Test\TestCase\Auth;

use Cake\Auth\FormAuthenticate;
use Cake\Cache\Cache;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\I18n\Time;
Expand Down
4 changes: 0 additions & 4 deletions tests/TestCase/BasicsTest.php
Expand Up @@ -16,12 +16,8 @@
*/
namespace Cake\Test\TestCase;

use Cake\Cache\Cache;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Event\EventManager;
use Cake\Filesystem\Folder;
use Cake\Log\Log;
use Cake\Network\Response;
use Cake\TestSuite\TestCase;

Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Cache/CacheTest.php
Expand Up @@ -17,7 +17,6 @@
use Cake\Cache\Cache;
use Cake\Cache\CacheRegistry;
use Cake\Cache\Engine\FileEngine;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\TestSuite\TestCase;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Collection/Iterator/SortIteratorTest.php
Expand Up @@ -16,7 +16,6 @@

use ArrayObject;
use Cake\Collection\Iterator\SortIterator;
use Cake\I18n\Time;
use Cake\TestSuite\TestCase;

/**
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Console/ConsoleErrorHandlerTest.php
Expand Up @@ -14,7 +14,6 @@
*/
namespace Cake\Test\TestCase\Console;

use Cake\Console\ConsoleErrorHandler;
use Cake\Controller\Exception\MissingActionException;
use Cake\Core\Exception\Exception;
use Cake\Log\Log;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Console/HelpFormatterTest.php
Expand Up @@ -19,7 +19,6 @@
use Cake\Console\ConsoleOptionParser;
use Cake\Console\HelpFormatter;
use Cake\TestSuite\TestCase;
use \DOMDocument as DomDocument;

/**
* Class HelpFormatterTest
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Console/ShellDispatcherTest.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Test\TestCase\Console;

use Cake\Console\ShellDispatcher;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\TestSuite\TestCase;
Expand Down
3 changes: 0 additions & 3 deletions tests/TestCase/Console/ShellTest.php
Expand Up @@ -17,13 +17,10 @@
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
use Cake\Console\Shell;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Filesystem\Folder;
use Cake\Log\Log;
use Cake\TestSuite\TestCase;
use Cake\Utility\Hash;
use TestApp\Shell\TestingDispatchShell;

/**
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Console/TaskRegistryTest.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Test\TestCase\Console;

use Cake\Console\TaskRegistry;
use Cake\Core\App;
use Cake\Core\Plugin;
use Cake\TestSuite\TestCase;

Expand Down
6 changes: 0 additions & 6 deletions tests/TestCase/Controller/Component/AuthComponentTest.php
Expand Up @@ -14,19 +14,13 @@
*/
namespace Cake\Test\TestCase\Controller\Component;

use Cake\Controller\ComponentRegistry;
use Cake\Controller\Component\AuthComponent;
use Cake\Controller\Controller;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Event\Event;
use Cake\Event\EventManager;
use Cake\Network\Exception\ForbiddenException;
use Cake\Network\Exception\UnauthorizedException;
use Cake\Network\Request;
use Cake\Network\Response;
use Cake\Network\Session;
use Cake\ORM\Entity;
use Cake\ORM\TableRegistry;
use Cake\Routing\Router;
use Cake\TestSuite\TestCase;
Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Controller/Component/CookieComponentTest.php
Expand Up @@ -16,8 +16,6 @@

use Cake\Controller\ComponentRegistry;
use Cake\Controller\Component\CookieComponent;
use Cake\Controller\Controller;
use Cake\Event\Event;
use Cake\I18n\Time;
use Cake\Network\Request;
use Cake\Network\Response;
Expand Down
Expand Up @@ -23,7 +23,6 @@
use Cake\Network\Request;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Utility\Hash;

/**
* PaginatorTestController class
Expand Down
Expand Up @@ -16,12 +16,9 @@

use Cake\Controller\ComponentRegistry;
use Cake\Controller\Component\RequestHandlerComponent;
use Cake\Controller\Controller;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Event\Event;
use Cake\Network\Request;
use Cake\Network\Response;
use Cake\Routing\DispatcherFactory;
use Cake\Routing\Router;
use Cake\TestSuite\TestCase;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Controller/ComponentRegistryTest.php
Expand Up @@ -18,7 +18,6 @@
use Cake\Controller\Component\AuthComponent;
use Cake\Controller\Component\CookieComponent;
use Cake\Controller\Controller;
use Cake\Core\App;
use Cake\Core\Plugin;
use Cake\Network\Request;
use Cake\Network\Response;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Controller/ComponentTest.php
Expand Up @@ -21,7 +21,6 @@
use Cake\TestSuite\TestCase;
use TestApp\Controller\ComponentTestController;
use TestApp\Controller\Component\AppleComponent;
use TestApp\Controller\Component\OrangeComponent;

/**
* ComponentTest class
Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Controller/ControllerTest.php
Expand Up @@ -16,7 +16,6 @@

use Cake\Controller\Component;
use Cake\Controller\Controller;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Event\Event;
Expand All @@ -26,7 +25,6 @@
use Cake\Routing\Router;
use Cake\TestSuite\Fixture\TestModel;
use Cake\TestSuite\TestCase;
use Cake\Utility\Hash;
use TestApp\Controller\Admin\PostsController;
use TestPlugin\Controller\TestPluginController;

Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Core/Configure/Engine/IniConfigTest.php
Expand Up @@ -14,7 +14,6 @@
*/
namespace Cake\Test\TestCase\Core\Configure\Engine;

use Cake\Core\App;
use Cake\Core\Configure\Engine\IniConfig;
use Cake\Core\Plugin;
use Cake\TestSuite\TestCase;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Core/Configure/Engine/JsonConfigTest.php
Expand Up @@ -14,7 +14,6 @@
*/
namespace Cake\Test\TestCase\Core\Configure\Engine;

use Cake\Core\App;
use Cake\Core\Configure\Engine\JsonConfig;
use Cake\Core\Plugin;
use Cake\TestSuite\TestCase;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Core/Configure/Engine/PhpConfigTest.php
Expand Up @@ -14,7 +14,6 @@
*/
namespace Cake\Test\TestCase\Core\Configure\Engine;

use Cake\Core\App;
use Cake\Core\Configure\Engine\PhpConfig;
use Cake\Core\Plugin;
use Cake\TestSuite\TestCase;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Core/ConfigureTest.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Test\TestCase\Core;

use Cake\Cache\Cache;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Configure\Engine\PhpConfig;
use Cake\Core\Plugin;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Core/PluginTest.php
Expand Up @@ -13,7 +13,6 @@
*/
namespace Cake\Test\TestCase\Core;

use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\TestSuite\TestCase;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Core/StaticConfigTraitTest.php
Expand Up @@ -15,7 +15,6 @@

use Cake\Core\StaticConfigTrait;
use Cake\TestSuite\TestCase;
use PHPUnit_Framework_Test;

/**
* TestConnectionManagerStaticConfig
Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Database/Driver/MysqlTest.php
Expand Up @@ -15,8 +15,6 @@
namespace Cake\Test\TestCase\Database\Driver;

use Cake\Core\Configure;
use Cake\Database\Connection;
use Cake\Database\Driver\Mysql;
use Cake\Datasource\ConnectionManager;
use Cake\TestSuite\TestCase;
use \PDO;
Expand Down
4 changes: 0 additions & 4 deletions tests/TestCase/Database/Driver/PostgresTest.php
Expand Up @@ -15,10 +15,6 @@
namespace Cake\Test\TestCase\Database\Driver;

use Cake\Core\Configure;
use Cake\Database\Connection;
use Cake\Database\Driver\Postgres;
use Cake\Database\Query;
use Cake\Datasource\ConnectionManager;
use Cake\TestSuite\TestCase;
use \PDO;

Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Database/Driver/SqliteTest.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Test\TestCase\Database\Driver;

use Cake\Core\Configure;
use Cake\Database\Connection;
use Cake\Database\Driver\Sqlite;
use Cake\Testsuite\TestCase;
use \PDO;
Expand Down
3 changes: 0 additions & 3 deletions tests/TestCase/Database/Driver/SqlserverTest.php
Expand Up @@ -15,9 +15,6 @@
namespace Cake\Test\TestCase\Database\Driver;

use Cake\Core\Configure;
use Cake\Database\Connection;
use Cake\Database\Driver\Sqlserver;
use Cake\Database\Query;
use Cake\TestSuite\TestCase;
use \PDO;

Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Database/Expression/QueryExpressionTest.php
Expand Up @@ -14,7 +14,6 @@
*/
namespace Cake\Test\TestCase\Database\Expression;

use Cake\Database\Expression\CaseExpression;
use Cake\Database\Expression\QueryExpression;
use Cake\Database\ValueBinder;
use Cake\TestSuite\TestCase;
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Database/Log/LoggingStatementTest.php
Expand Up @@ -16,7 +16,6 @@

use Cake\Database\Log\LoggingStatement;
use Cake\TestSuite\TestCase;
use PDOStatement;

/**
* Tests LoggingStatement class
Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Database/Schema/CollectionTest.php
Expand Up @@ -16,9 +16,7 @@

use Cake\Cache\Cache;
use Cake\Core\Configure;
use Cake\Database\Connection;
use Cake\Database\Schema\Collection;
use Cake\Database\Schema\Table;
use Cake\Datasource\ConnectionManager;
use Cake\TestSuite\TestCase;

Expand Down
Expand Up @@ -16,7 +16,6 @@

use Cake\Database\Statement\StatementDecorator;
use Cake\TestSuite\TestCase;
use \PDO;

/**
* Tests StatementDecorator class
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Database/Type/BinaryTypeTest.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Test\TestCase\Database\Type;

use Cake\Database\Type;
use Cake\Database\Type\BinaryType;
use Cake\TestSuite\TestCase;
use \PDO;

Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Database/Type/IntegerTypeTest.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Test\TestCase\Database\Type;

use Cake\Database\Type;
use Cake\Database\Type\IntegerType;
use Cake\TestSuite\TestCase;
use \PDO;

Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Database/Type/UuidTypeTest.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Test\TestCase\Database\Type;

use Cake\Database\Type;
use Cake\Database\Type\UuidType;
use Cake\TestSuite\TestCase;
use \PDO;

Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Datasource/ConnectionManagerTest.php
Expand Up @@ -11,9 +11,7 @@
*/
namespace Cake\Test\TestCase\Datasource;

use Cake\Core\App;
use Cake\Core\Plugin;
use Cake\Database\Driver\Sqlite;
use Cake\Datasource\ConnectionManager;
use Cake\TestSuite\TestCase;

Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Error/DebuggerTest.php
Expand Up @@ -19,7 +19,6 @@
use Cake\Error\Debugger;
use Cake\Log\Log;
use Cake\TestSuite\TestCase;
use Cake\View\View;

/**
* DebuggerTestCaseDebugger class
Expand Down

0 comments on commit 94e84db

Please sign in to comment.