Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: Use Acme namespace for internal tests #501

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"autoload-dev": {
"psr-4": {
"Liip\\FunctionalTestBundle\\Tests\\": "tests/"
"Liip\\Acme\\Tests\\": "tests/"
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>

<php>
<server name="KERNEL_CLASS" value="Liip\FunctionalTestBundle\Tests\App\AppKernel" />
<server name="KERNEL_CLASS" value="Liip\Acme\Tests\App\AppKernel" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
</php>

Expand Down
2 changes: 1 addition & 1 deletion tests/App/AcmeBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App;
namespace Liip\Acme\Tests\App;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
Expand Down
4 changes: 2 additions & 2 deletions tests/App/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App;
namespace Liip\Acme\Tests\App;

use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand All @@ -29,7 +29,7 @@ public function registerBundles(): array
new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new \Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new \Liip\FunctionalTestBundle\LiipFunctionalTestBundle(),
new \Liip\FunctionalTestBundle\Tests\App\AcmeBundle(),
new \Liip\Acme\Tests\App\AcmeBundle(),
new \Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle(),
new \Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle(),
];
Expand Down
2 changes: 1 addition & 1 deletion tests/App/Command/TestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\Command;
namespace Liip\Acme\Tests\App\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
Expand Down
2 changes: 1 addition & 1 deletion tests/App/Command/TestStatusCodeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\Command;
namespace Liip\Acme\Tests\App\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
Expand Down
4 changes: 2 additions & 2 deletions tests/App/Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\Controller;
namespace Liip\Acme\Tests\App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
Expand Down Expand Up @@ -39,7 +39,7 @@ public function indexAction(): Response
*/
public function userAction(int $userId): Response
{
/** @var \Liip\FunctionalTestBundle\Tests\App\Entity\User $user */
/** @var \Liip\Acme\Tests\App\Entity\User $user */
$user = $this->getDoctrine()
->getRepository('LiipFunctionalTestBundle:User')
->find($userId);
Expand Down
6 changes: 3 additions & 3 deletions tests/App/DataFixtures/ORM/LoadDependentUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM;
namespace Liip\Acme\Tests\App\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
Expand All @@ -38,7 +38,7 @@ public function setContainer(ContainerInterface $container = null): void
*/
public function load(ObjectManager $manager): void
{
/** @var \Liip\FunctionalTestBundle\Tests\App\Entity\User $user */
/** @var \Liip\Acme\Tests\App\Entity\User $user */
$user = clone $this->getReference('user');

$user->setId(3);
Expand All @@ -60,7 +60,7 @@ public function load(ObjectManager $manager): void
public function getDependencies(): array
{
return [
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserData',
'Liip\Acme\Tests\App\DataFixtures\ORM\LoadUserData',
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM;
namespace Liip\Acme\Tests\App\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
Expand All @@ -38,7 +38,7 @@ public function setContainer(ContainerInterface $container = null): void
*/
public function load(ObjectManager $manager): void
{
/** @var \Liip\FunctionalTestBundle\Tests\App\Entity\User $user */
/** @var \Liip\Acme\Tests\App\Entity\User $user */
$user = clone $this->getReference('user');

$user->setId(3);
Expand All @@ -60,7 +60,7 @@ public function load(ObjectManager $manager): void
public function getDependencies(): array
{
return [
'Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\LoadUserWithServiceData',
'Liip\Acme\Tests\App\DataFixtures\ORM\LoadUserWithServiceData',
];
}
}
6 changes: 3 additions & 3 deletions tests/App/DataFixtures/ORM/LoadSecondUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM;
namespace Liip\Acme\Tests\App\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Liip\FunctionalTestBundle\Tests\App\Entity\User;
use Liip\Acme\Tests\App\Entity\User;
use Symfony\Component\DependencyInjection\ContainerInterface;

class LoadSecondUserData extends AbstractFixture implements FixtureInterface
Expand All @@ -39,7 +39,7 @@ public function setContainer(ContainerInterface $container = null): void
*/
public function load(ObjectManager $manager): void
{
/** @var \Liip\FunctionalTestBundle\Tests\App\Entity\User $user */
/** @var \Liip\Acme\Tests\App\Entity\User $user */
$user = new User();
$user->setName('bar foo');
$user->setEmail('[email protected]');
Expand Down
6 changes: 3 additions & 3 deletions tests/App/DataFixtures/ORM/LoadUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM;
namespace Liip\Acme\Tests\App\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Liip\FunctionalTestBundle\Tests\App\Entity\User;
use Liip\Acme\Tests\App\Entity\User;
use Symfony\Component\DependencyInjection\ContainerInterface;

class LoadUserData extends AbstractFixture implements FixtureInterface
Expand All @@ -39,7 +39,7 @@ public function setContainer(ContainerInterface $container = null): void
*/
public function load(ObjectManager $manager): void
{
/** @var \Liip\FunctionalTestBundle\Tests\App\Entity\User $user */
/** @var \Liip\Acme\Tests\App\Entity\User $user */
$user = new User();
$user->setId(1);
$user->setName('foo bar');
Expand Down
6 changes: 3 additions & 3 deletions tests/App/DataFixtures/ORM/LoadUserWithServiceData.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM;
namespace Liip\Acme\Tests\App\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Liip\FunctionalTestBundle\Tests\App\Entity\User;
use Liip\Acme\Tests\App\Entity\User;
use Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface;

class LoadUserWithServiceData extends AbstractFixture implements FixtureInterface
Expand All @@ -35,7 +35,7 @@ public function load(ObjectManager $manager): void
{
$this->tokenStorage->setToken('id', 'value');

/** @var \Liip\FunctionalTestBundle\Tests\App\Entity\User $user */
/** @var \Liip\Acme\Tests\App\Entity\User $user */
$user = new User();
$user->setId(1);
$user->setName('foo bar');
Expand Down
2 changes: 1 addition & 1 deletion tests/App/DataFixtures/ORM/user.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Liip\FunctionalTestBundle\Tests\App\Entity\User:
Liip\Acme\Tests\App\Entity\User:
id{1..10}:
name: <name()>
email: <email()>
Expand Down
2 changes: 1 addition & 1 deletion tests/App/DataFixtures/ORM/user_with_custom_provider.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Liip\FunctionalTestBundle\Tests\App\Entity\User:
Liip\Acme\Tests\App\Entity\User:
id{1..10}:
name: <foo('a string')>
email: <email()>
Expand Down
2 changes: 1 addition & 1 deletion tests/App/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\App\Entity;
namespace Liip\Acme\Tests\App\Entity;

use Symfony\Component\Security\Core\User\UserInterface;

Expand Down
2 changes: 1 addition & 1 deletion tests/App/Resources/config/doctrine/User.orm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Liip\FunctionalTestBundle\Tests\App\Entity\User:
Liip\Acme\Tests\App\Entity\User:
type: entity
table: 'liip_user'
id:
Expand Down
2 changes: 1 addition & 1 deletion tests/App/Resources/views/form_with_embed.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block body %}
<div>
{{ render(controller('Liip\\FunctionalTestBundle\\Tests\\App\\Controller\\DefaultController::embeddedAction')) }}
{{ render(controller('Liip\\Acme\\Tests\\App\\Controller\\DefaultController::embeddedAction')) }}
</div>

{{ form(form) }}
Expand Down
14 changes: 7 additions & 7 deletions tests/App/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ doctrine:
LiipFunctionalTestBundle:
type: php
dir: "%kernel.root_dir%/../App/Entity"
prefix: 'Liip\FunctionalTestBundle\Tests\App\Entity'
prefix: 'Liip\Acme\Tests\App\Entity'
LiipFunctionalTestBundleYml:
type: "yml"
dir: "%kernel.root_dir%/../App/Resources/config/doctrine"
prefix: 'Liip\FunctionalTestBundle\Tests\App\Entity'
prefix: 'Liip\Acme\Tests\App\Entity'

security:
encoders:
# in_memory users
Symfony\Component\Security\Core\User\User: plaintext
# User entity
Liip\FunctionalTestBundle\Tests\App\Entity\User: plaintext
Liip\Acme\Tests\App\Entity\User: plaintext
providers:
chain_provider:
chain:
Expand All @@ -67,7 +67,7 @@ security:
password: "12341234"
roles: 'ROLE_USER'
main:
entity: { class: Liip\FunctionalTestBundle\Tests\App\Entity\User, property: id }
entity: { class: Liip\Acme\Tests\App\Entity\User, property: id }
firewalls:
secured_area:
pattern: ^/
Expand All @@ -82,10 +82,10 @@ services:
_defaults:
autowire: true
autoconfigure: true
Liip\FunctionalTestBundle\Tests\App\DataFixtures\ORM\:
Liip\Acme\Tests\App\DataFixtures\ORM\:
resource: 'DataFixtures/ORM/*'
tags: ['doctrine.fixture.orm']
Liip\FunctionalTestBundle\Tests\App\Command\TestCommand:
Liip\Acme\Tests\App\Command\TestCommand:
tags: ['console.command']
Liip\FunctionalTestBundle\Tests\App\Command\TestStatusCodeCommand:
Liip\Acme\Tests\App\Command\TestStatusCodeCommand:
tags: ['console.command']
10 changes: 5 additions & 5 deletions tests/App/routing.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
liipfunctionaltestbundle_homepage:
path: /
defaults: { _controller: 'Liip\FunctionalTestBundle\Tests\App\Controller\DefaultController::indexAction' }
defaults: { _controller: 'Liip\Acme\Tests\App\Controller\DefaultController::indexAction' }

liipfunctionaltestbundle_user:
path: /user/{userId}
defaults: { _controller: 'Liip\FunctionalTestBundle\Tests\App\Controller\DefaultController::userAction' }
defaults: { _controller: 'Liip\Acme\Tests\App\Controller\DefaultController::userAction' }
requirements:
userId: \d+

liipfunctionaltestbundle_form:
path: /form
defaults: { _controller: 'Liip\FunctionalTestBundle\Tests\App\Controller\DefaultController::formAction' }
defaults: { _controller: 'Liip\Acme\Tests\App\Controller\DefaultController::formAction' }

liipfunctionaltestbundle_form_with_embed:
path: /form-with-embed
defaults: { _controller: 'Liip\FunctionalTestBundle\Tests\App\Controller\DefaultController::formWithEmbedAction' }
defaults: { _controller: 'Liip\Acme\Tests\App\Controller\DefaultController::formWithEmbedAction' }

liipfunctionaltestbundle_json:
path: /json
defaults: { _controller: 'Liip\FunctionalTestBundle\Tests\App\Controller\DefaultController::jsonAction' }
defaults: { _controller: 'Liip\Acme\Tests\App\Controller\DefaultController::jsonAction' }
requirements:
userId: \d+
4 changes: 2 additions & 2 deletions tests/AppConfig/AppConfigKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\AppConfig;
namespace Liip\Acme\Tests\AppConfig;

/*
* This file is part of the Liip/FunctionalTestBundle
Expand All @@ -22,7 +22,7 @@
* with this source code in the file LICENSE.
*/

use Liip\FunctionalTestBundle\Tests\App\AppKernel;
use Liip\Acme\Tests\App\AppKernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppConfigKernel extends AppKernel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\AppConfig\DataFixtures\Faker\Provider;
namespace Liip\Acme\Tests\AppConfig\DataFixtures\Faker\Provider;

class FooProvider
{
Expand Down
2 changes: 1 addition & 1 deletion tests/AppConfig/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ liip_functional_test:
services:
# HautelookAliceBundle: custom Faker provider
faker.provider.foo:
class: Liip\FunctionalTestBundle\Tests\AppConfig\DataFixtures\Faker\Provider\FooProvider
class: Liip\Acme\Tests\AppConfig\DataFixtures\Faker\Provider\FooProvider
tags: [ { name: nelmio_alice.faker.provider } ]
4 changes: 2 additions & 2 deletions tests/AppConfigLeanFramework/AppConfigLeanFrameworkKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\AppConfigLeanFramework;
namespace Liip\Acme\Tests\AppConfigLeanFramework;

use Liip\FunctionalTestBundle\Tests\App\AppKernel;
use Liip\Acme\Tests\App\AppKernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppConfigLeanFrameworkKernel extends AppKernel
Expand Down
4 changes: 2 additions & 2 deletions tests/AppConfigMysql/AppConfigMysqlKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\AppConfigMysql;
namespace Liip\Acme\Tests\AppConfigMysql;

use Liip\FunctionalTestBundle\Tests\App\AppKernel;
use Liip\Acme\Tests\App\AppKernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppConfigMysqlKernel extends AppKernel
Expand Down
4 changes: 2 additions & 2 deletions tests/AppConfigMysqlCacheDb/AppConfigMysqlKernelCacheDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\AppConfigMysqlCacheDb;
namespace Liip\Acme\Tests\AppConfigMysqlCacheDb;

use Liip\FunctionalTestBundle\Tests\AppConfigMysql\AppConfigMysqlKernel;
use Liip\Acme\Tests\AppConfigMysql\AppConfigMysqlKernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppConfigMysqlKernelCacheDb extends AppConfigMysqlKernel
Expand Down
4 changes: 2 additions & 2 deletions tests/AppConfigPhpcr/AppConfigPhpcrKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* with this source code in the file LICENSE.
*/

namespace Liip\FunctionalTestBundle\Tests\AppConfigPhpcr;
namespace Liip\Acme\Tests\AppConfigPhpcr;

use Liip\FunctionalTestBundle\Tests\App\AppKernel;
use Liip\Acme\Tests\App\AppKernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppConfigPhpcrKernel extends AppKernel
Expand Down
Loading