Hy,Как выбрать локаль для STOF переводимого с NelmioAliceBundle Крепежом в Symfony
В течение некоторого времени знает, что есть проблема с моим тестовым сценарием. Я использую behate/mink ~ 2.0 и Nelmio/Alice^2.x в своем проекте Symfony. В каком-то из моих проектов я использую расширение доктрины, которое можно перевести для управления i18n на моем объекте buisness.
Когда Алиса продолжает мой инструмент, он, кажется, игнорирует мой параметр default_locale и всегда будет создавать их с en как значением локали.
Чтобы проверить мой коммутатор языкового стандарта, мне нужен способ выбрать мой локаль для проекта в среде тестирования или/и перенести прибор с другой локалью.
Моей арматуры является Райтом, как следовать
AcmmeBundle\CoreBundle\Entity\Universe:
universe1:
title: <word()>
templates: [@template1]
collections: [@collection1, @collection2]
categories: [@category1, @category2]
нагрузки в моем тесте, как этот
@alice(User)
@alice(Category)
@alice(Collection)
@alice(Universe)
@alice(Page)
@alice(HomePage)
@reset-schema
@javascript
Feature: I test api GET /api/someEntity
И моего behat.yml.dist
default:
autoload:
'': features/bootstrap
suites:
default:
contexts:
- Victoire\Tests\Features\Context\FeatureContext
- Victoire\Tests\Features\Context\JavascriptContext
- Victoire\Tests\Features\Context\VictoireContext
- Knp\FriendlyContexts\Context\MinkContext
- Knp\FriendlyContexts\Context\AliceContext
- Knp\FriendlyContexts\Context\EntityContext
- Knp\FriendlyContexts\Context\TableContext
- FeatureContext
- PageContext
- ApiContext
formatters:
html:
output_path: %paths.base%/web/build/html/behat
pretty:
output_path:
extensions:
emuse\BehatHTMLFormatter\BehatHTMLFormatterExtension:
name: html
renderer: Twig,Behat2
file_name: Index
print_args: true
print_outp: true
loop_break: true
jarnaiz\JUnitFormatter\JUnitFormatterExtension:
filename: report.xml
outputDir: %paths.base%/test-reports/
Behat\Symfony2Extension:
kernel:
path: app/AppKernel.php
debug: true
Behat\MinkExtension\ServiceContainer\MinkExtension:
base_url: 'http://127.0.0.1/app_test.php'
selenium2:
wd_host: 127.0.0.1:4444/wd/hub
capabilities: { "browser": "firefox"}
goutte: ~
symfony2: ~
default_session: symfony2
browser_name: firefox
Knp\FriendlyContexts\Extension:
entities:
namespaces:
- Acme
- Victoire
smartTag: smartStep
alice:
locale: fr_FR
fixtures:
Media: features/fixtures/media.yml
Template: features/fixtures/template.yml
User: features/fixtures/user.yml
Survey: features/fixtures/survey.yml
Tag: features/fixtures/tag.yml
Collection: features/fixtures/collection.yml
Category: features/fixtures/category.yml
Universe: features/fixtures/universe.yml
Page: features/fixtures/Victoire/page.yml
HomePage: features/fixtures/Victoire/Pages/home.yml
dependencies:
Template: [Media]
User: [Template]
Survey: [Tag]
HomePage: [Page]