add doctrine fixtures bundle

This commit is contained in:
Julien Fastré 2014-11-09 13:49:19 +01:00
parent c77bfe989c
commit 568bf4f3c2
3 changed files with 42 additions and 1 deletions

View File

@ -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)
);
}

View File

@ -27,4 +27,41 @@ doctrine:
auto_mapping: true
chill_main:
available_languages: [ fr, nl, en ]
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 }

View File

@ -39,5 +39,8 @@
},
"extra": {
"symfony-app-dir": "Tests/Fixtures/App/app"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "~2.2@dev"
}
}