mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-30 05:59:35 +00:00
Added tests for RedirectController
This commit is contained in:
parent
40ca5bd0e4
commit
45a624d768
15 changed files with 509 additions and 6 deletions
|
|
@ -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],
|
||||
];
|
||||
|
|
|
|||
4
config/packages/test/dama_doctrine_test_bundle.yaml
Normal file
4
config/packages/test/dama_doctrine_test_bundle.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
dama_doctrine_test:
|
||||
enable_static_connection: true
|
||||
enable_static_meta_data_cache: true
|
||||
enable_static_query_cache: true
|
||||
6
config/packages/test/security.yaml
Normal file
6
config/packages/test/security.yaml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# config/packages/test/security.yaml
|
||||
security:
|
||||
firewalls:
|
||||
# replace 'main' by the name of your own firewall
|
||||
main:
|
||||
http_basic: ~
|
||||
|
|
@ -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})?\\\\//')"
|
||||
Loading…
Add table
Add a link
Reference in a new issue