minor #9897 fixed some PSR-0 class names (fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

fixed some PSR-0 class names

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

a38e2c0 fixes PSR-0 issues in tests
This commit is contained in:
Fabien Potencier 2013-12-30 22:38:15 +01:00
commit 63d226db12
42 changed files with 53 additions and 52 deletions

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection\Compiler;
namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection\CompilerPass;
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests;
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy;
require_once __DIR__ . '/Fixtures/includes/foo.php';

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Dumper;
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\Dumper;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Instantiator;
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\Instantiator;
use ProxyManager\Proxy\LazyLoadingInterface;
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Instantiator;
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\DependencyInjection\Definition;
@ -56,8 +56,8 @@ class ProxyDumperTest extends \PHPUnit_Framework_TestCase
$code = $this->dumper->getProxyCode($definition);
$this->assertStringMatchesFormat(
'%Aclass SymfonyBridgeProxyManagerLazyProxyTestsInstantiatorProxyDumperTest%aextends%w'
. '\Symfony\Bridge\ProxyManager\LazyProxy\Tests\Instantiator%a',
'%Aclass SymfonyBridgeProxyManagerTestsLazyProxyPhpDumperProxyDumperTest%aextends%w'
. '\Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper\ProxyDumperTest%a',
$code
);
}
@ -72,7 +72,7 @@ class ProxyDumperTest extends \PHPUnit_Framework_TestCase
$this->assertStringMatchesFormat(
'%wif ($lazyLoad) {%w$container = $this;%wreturn $this->services[\'foo\'] = new '
. 'SymfonyBridgeProxyManagerLazyProxyTestsInstantiatorProxyDumperTest_%s(%wfunction '
. 'SymfonyBridgeProxyManagerTestsLazyProxyPhpDumperProxyDumperTest_%s(%wfunction '
. '(&$wrappedInstance, \ProxyManager\Proxy\LazyLoadingInterface $proxy) use ($container) {'
. '%w$wrappedInstance = $container->getFooService(false);%w$proxy->setProxyInitializer(null);'
. '%wreturn true;%w}%w);%w}%w',

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Node;
namespace Symfony\Bridge\Twig\Tests\TokenParser;
use Symfony\Bridge\Twig\Tests\TestCase;
use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser;

View File

@ -15,7 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
class RoutingTest extends \PHPUnit_Framework_TestCase
class RouterTest extends \PHPUnit_Framework_TestCase
{
public function testGenerateWithServiceParam()
{

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\Config\Tests;
use Symfony\Component\Config\ConfigCache;
use Symfony\Component\Config\Resource\FileResource;
class ConfigTest extends \PHPUnit_Framework_TestCase
class ConfigCacheTest extends \PHPUnit_Framework_TestCase
{
private $resourceFile = null;

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\Config\Tests\Definition;
use Symfony\Component\Config\Definition\NodeInterface;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
class NormalizerTest extends \PHPUnit_Framework_TestCase
class NormalizationTest extends \PHPUnit_Framework_TestCase
{
/**
* @dataProvider getEncoderTests

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\Console\Tests\Formatter;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
class FormatterStyleTest extends \PHPUnit_Framework_TestCase
class OutputFormatterTest extends \PHPUnit_Framework_TestCase
{
public function testEmptyTag()
{

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Tests\Handler;
namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Reader;
use Symfony\Component\CssSelector\Parser\Token;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Tests\Handler;
namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Handler\CommentHandler;
use Symfony\Component\CssSelector\Parser\Reader;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Tests\Handler;
namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Handler\HashHandler;
use Symfony\Component\CssSelector\Parser\Token;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Tests\Handler;
namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Handler\IdentifierHandler;
use Symfony\Component\CssSelector\Parser\Token;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Tests\Handler;
namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Handler\NumberHandler;
use Symfony\Component\CssSelector\Parser\Token;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Tests\Handler;
namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Handler\StringHandler;
use Symfony\Component\CssSelector\Parser\Token;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Tests\Handler;
namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
use Symfony\Component\CssSelector\Parser\Handler\WhitespaceHandler;
use Symfony\Component\CssSelector\Parser\Token;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Tests;
namespace Symfony\Component\Finder\Tests\Expression;
use Symfony\Component\Finder\Expression\Expression;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Tests;
namespace Symfony\Component\Finder\Tests\Expression;
use Symfony\Component\Finder\Expression\Expression;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Tests;
namespace Symfony\Component\Finder\Tests\Expression;
use Symfony\Component\Finder\Expression\Expression;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Form\Test;
namespace Symfony\Component\Form\Tests;
class FormRendererTest extends \PHPUnit_Framework_TestCase
{

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpFoundation\Tests\File;
namespace Symfony\Component\HttpFoundation\Tests\File\MimeType;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser;

View File

@ -22,7 +22,7 @@ use Symfony\Component\HttpFoundation\Session\Session;
*
* @runTestsInSeparateProcesses
*/
class NullSessionStorageTest extends \PHPUnit_Framework_TestCase
class NullSessionHandlerTest extends \PHPUnit_Framework_TestCase
{
public function testSaveHandlers()
{

View File

@ -23,7 +23,7 @@ use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
*
* @runTestsInSeparateProcesses
*/
class PhpSessionStorageTest extends \PHPUnit_Framework_TestCase
class PhpBridgeSessionStorageTest extends \PHPUnit_Framework_TestCase
{
private $savePath;

View File

@ -9,9 +9,10 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Tests;
namespace Symfony\Component\HttpKernel\Tests\Controller;
use Symfony\Component\HttpKernel\Controller\ControllerResolver;
use Symfony\Component\HttpKernel\Tests\Logger;
use Symfony\Component\HttpFoundation\Request;
class ControllerResolverTest extends \PHPUnit_Framework_TestCase
@ -32,9 +33,9 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase
$this->assertFalse($resolver->getController($request), '->getController() returns false when the request has no _controller attribute');
$this->assertEquals(array('Unable to look for the controller as the "_controller" parameter is missing'), $logger->getLogs('warning'));
$request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\ControllerResolverTest::testGetController');
$request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::testGetController');
$controller = $resolver->getController($request);
$this->assertInstanceOf('Symfony\Component\HttpKernel\Tests\ControllerResolverTest', $controller[0], '->getController() returns a PHP callable');
$this->assertInstanceOf('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', $controller[0], '->getController() returns a PHP callable');
$request->attributes->set('_controller', $lambda = function () {});
$controller = $resolver->getController($request);
@ -44,21 +45,21 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase
$controller = $resolver->getController($request);
$this->assertSame($this, $controller);
$request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\ControllerResolverTest');
$request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest');
$controller = $resolver->getController($request);
$this->assertInstanceOf('Symfony\Component\HttpKernel\Tests\ControllerResolverTest', $controller);
$this->assertInstanceOf('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', $controller);
$request->attributes->set('_controller', array($this, 'controllerMethod1'));
$controller = $resolver->getController($request);
$this->assertSame(array($this, 'controllerMethod1'), $controller);
$request->attributes->set('_controller', array('Symfony\Component\HttpKernel\Tests\ControllerResolverTest', 'controllerMethod4'));
$request->attributes->set('_controller', array('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', 'controllerMethod4'));
$controller = $resolver->getController($request);
$this->assertSame(array('Symfony\Component\HttpKernel\Tests\ControllerResolverTest', 'controllerMethod4'), $controller);
$this->assertSame(array('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest', 'controllerMethod4'), $controller);
$request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\some_controller_function');
$request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\Controller\some_controller_function');
$controller = $resolver->getController($request);
$this->assertSame('Symfony\Component\HttpKernel\Tests\some_controller_function', $controller);
$this->assertSame('Symfony\Component\HttpKernel\Tests\Controller\some_controller_function', $controller);
$request->attributes->set('_controller', 'foo');
try {
@ -76,7 +77,7 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase
$this->assertInstanceOf('\InvalidArgumentException', $e, '->getController() throws an \InvalidArgumentException if the _controller attribute contains a non-existent class');
}
$request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\ControllerResolverTest::bar');
$request->attributes->set('_controller', 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar');
try {
$resolver->getController($request);
$this->fail('->getController() throws an \InvalidArgumentException if the _controller attribute contains a non-existent method');
@ -126,7 +127,7 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase
$request = Request::create('/');
$request->attributes->set('foo', 'foo');
$request->attributes->set('foobar', 'foobar');
$controller = 'Symfony\Component\HttpKernel\Tests\some_controller_function';
$controller = 'Symfony\Component\HttpKernel\Tests\Controller\some_controller_function';
$this->assertEquals(array('foo', 'foobar'), $resolver->getArguments($request, $controller));
$request = Request::create('/');
@ -153,7 +154,7 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase
public function testCreateControllerCanReturnAnyCallable()
{
$mock = $this->getMock('Symfony\Component\HttpKernel\Controller\ControllerResolver', array('createController'));
$mock->expects($this->once())->method('createController')->will($this->returnValue('Symfony\Component\HttpKernel\Tests\some_controller_function'));
$mock->expects($this->once())->method('createController')->will($this->returnValue('Symfony\Component\HttpKernel\Tests\Controller\some_controller_function'));
$request = Request::create('/');
$request->attributes->set('_controller', 'foobar');

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Tests;
namespace Symfony\Component\HttpKernel\Tests\DependencyInjection;
use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Tests\Fragment\FragmentRenderer;
namespace Symfony\Component\HttpKernel\Tests\Fragment;
use Symfony\Component\HttpKernel\Controller\ControllerReference;
use Symfony\Component\HttpKernel\Fragment\EsiFragmentRenderer;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Fragment\Tests\FragmentRenderer;
namespace Symfony\Component\HttpKernel\Tests\Fragment;
use Symfony\Component\HttpKernel\Controller\ControllerReference;
use Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Fragment\Tests\FragmentRenderer;
namespace Symfony\Component\HttpKernel\Tests\Fragment;
use Symfony\Component\HttpKernel\Controller\ControllerReference;
use Symfony\Component\HttpKernel\HttpKernel;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Fragment\Tests\FragmentRenderer;
namespace Symfony\Component\HttpKernel\Tests\Fragment;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ControllerReference;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Routing\Test\Matcher\Dumper;
namespace Symfony\Component\Routing\Tests\Matcher\Dumper;
use Symfony\Component\Routing\Matcher\Dumper\DumperCollection;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Security\Tests\Domain;
namespace Symfony\Component\Security\Tests\Acl\Domain;
use Symfony\Component\Security\Acl\Domain\Entry;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Security\Tests\Acl\Util;
namespace Symfony\Component\Security\Tests\Acl\Permission;
use Symfony\Component\Security\Acl\Permission\MaskBuilder;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Security\Tests\Http;
namespace Symfony\Component\Security\Tests\Http\Authentication;
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler;
use Symfony\Component\Security\Core\SecurityContextInterface;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Security\Tests\Http;
namespace Symfony\Component\Security\Tests\Http\Authentication;
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Translation\Test\Catalogue;
namespace Symfony\Component\Translation\Tests\Catalogue;
use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\MessageCatalogueInterface;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Translation\Test\Catalogue;
namespace Symfony\Component\Translation\Tests\Catalogue;
use Symfony\Component\Translation\Catalogue\DiffOperation;
use Symfony\Component\Translation\MessageCatalogue;

View File

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Symfony\Component\Translation\Test\Catalogue;
namespace Symfony\Component\Translation\Tests\Catalogue;
use Symfony\Component\Translation\Catalogue\MergeOperation;
use Symfony\Component\Translation\MessageCatalogue;