diff --git a/Tests/Fixtures/App/app/AppKernel.php b/Tests/Fixtures/App/app/AppKernel.php index 38d9f50fa..1f1941221 100644 --- a/Tests/Fixtures/App/app/AppKernel.php +++ b/Tests/Fixtures/App/app/AppKernel.php @@ -15,6 +15,7 @@ class AppKernel extends Kernel new \Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new \Chill\MainBundle\ChillMainBundle, + new \Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle() #add here all the required bundle (some bundle are not required) ); } diff --git a/Tests/Fixtures/App/app/config/config.yml b/Tests/Fixtures/App/app/config/config.yml index 68250de45..354856026 100644 --- a/Tests/Fixtures/App/app/config/config.yml +++ b/Tests/Fixtures/App/app/config/config.yml @@ -27,4 +27,41 @@ doctrine: auto_mapping: true chill_main: - available_languages: [ fr, nl, en ] \ No newline at end of file + available_languages: [ fr, nl, en ] + +security: + providers: + chain_provider: + chain : + providers: [in_memory, users] + in_memory: + memory: + users: + admin: { password: olala, roles: 'ROLE_ADMIN' } + users: + entity: + class: Chill\MainBundle\Entity\User + property: username + + encoders: + Chill\MainBundle\Entity\User: + algorithm: bcrypt + Symfony\Component\Security\Core\User\User: plaintext + + firewalls: + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + + default: + anonymous: ~ + form_login: + csrf_parameter: _csrf_token + intention: authenticate + csrf_provider: form.csrf_provider + logout: ~ + access_control: + #disable authentication for tests + #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } + #- { path: ^/admin, roles: ROLE_ADMIN } + #- { path: ^/, roles: ROLE_USER } \ No newline at end of file diff --git a/composer.json b/composer.json index f9468aa09..0f7dc365e 100644 --- a/composer.json +++ b/composer.json @@ -39,5 +39,8 @@ }, "extra": { "symfony-app-dir": "Tests/Fixtures/App/app" + }, + "require-dev": { + "doctrine/doctrine-fixtures-bundle": "~2.2@dev" } }