Added tests for RedirectController

This commit is contained in:
Jan Böhmer 2019-10-20 14:35:19 +02:00
parent 40ca5bd0e4
commit 45a624d768
15 changed files with 509 additions and 6 deletions

View file

@ -20,4 +20,6 @@ return [
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
];

View file

@ -0,0 +1,4 @@
dama_doctrine_test:
enable_static_connection: true
enable_static_meta_data_cache: true
enable_static_query_cache: true

View file

@ -0,0 +1,6 @@
# config/packages/test/security.yaml
security:
firewalls:
# replace 'main' by the name of your own firewall
main:
http_basic: ~

View file

@ -9,4 +9,4 @@ redirector:
url: ".*"
controller: App\Controller\RedirectController:addLocalePart
# Dont match localized routes (no redirection loop, if no root with that name exists)
condition: "not (request.getPathInfo() matches '/\\\\/[a-z]{2}(_[A-Z]{2})?\\\\//')"
condition: "not (request.getPathInfo() matches '/^\\\\/[a-z]{2}(_[A-Z]{2})?\\\\//')"