From c5c1b84f88c7c5684210c4abadcbdd595ab3aa6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Nov 2014 16:58:33 +0100 Subject: [PATCH] add dependencies --- .travis.yml | 4 +-- Tests/Fixtures/App/AppKernel.php | 1 + Tests/Fixtures/App/config/config_test.yml | 36 ++++++++++++++++++++++- composer.json | 3 +- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 22adc9f0f..4af7b622d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,8 @@ install: before_script: - php Tests/Fixtures/App/console --env=test cache:warmup - psql -c 'create database test0;' -U postgres - - php Tests/Fixtures/App/console doctrine:schema:create --env=test - - php Tests/Fixtures/App/console doctrine:fixtures:load --env=test + - php Tests/Fixtures/App/console doctrine:schema:create --env=test --no-interaction + - php Tests/Fixtures/App/console doctrine:fixtures:load --env=test --no-interaction script: phpunit --coverage-text diff --git a/Tests/Fixtures/App/AppKernel.php b/Tests/Fixtures/App/AppKernel.php index 001d9f4a1..1b9e908c3 100644 --- a/Tests/Fixtures/App/AppKernel.php +++ b/Tests/Fixtures/App/AppKernel.php @@ -14,6 +14,7 @@ class AppKernel extends Kernel new Symfony\Bundle\TwigBundle\TwigBundle(), new \Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), + new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle() ); } diff --git a/Tests/Fixtures/App/config/config_test.yml b/Tests/Fixtures/App/config/config_test.yml index a7d7c2a4e..190ea71c5 100644 --- a/Tests/Fixtures/App/config/config_test.yml +++ b/Tests/Fixtures/App/config/config_test.yml @@ -4,4 +4,38 @@ imports: framework: test: ~ session: - storage_id: session.storage.filesystem \ No newline at end of file + storage_id: session.storage.filesystem + +security: + providers: + users: + entity: + class: Chill\MainBundle\Entity\User + property: username + + encoders: + Chill\MainBundle\Entity\User: + algorithm: bcrypt + + 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: + - { 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 5fab1a8b9..71d51b238 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ }, "require-dev": { "symfony/dom-crawler": "2.5", - "doctrine/doctrine-fixtures-bundle": "~2.2" + "doctrine/doctrine-fixtures-bundle": "~2.2", + "symfony/security": "~2.5" } }