blumilksoftware / blt

Behat+Laravel toolbox. Still in progress.
https://packagist.org/packages/blumilksoftware/blt
MIT License
4 stars 0 forks source link

Add translation tools #16

Closed krzysztofrewak closed 3 months ago

krzysztofrewak commented 2 years ago

There's empty Blumilk\BLT\Features\Traits\Translations trait. I would love to have tool to test Laravel translations and its configuration. Something like this would be cool:

Feature: Test translations

  Scenario Outline: Error message for not found page is translated properly
    Given localisation header is set to "<locale>"
    When a user is requesting "/non-existing-page"
    Then thrown exception should have message "<message>"
    Examples:
      | locale | message                         |
      | en     | Requested page was not found.   |
      | pl     | Strona nie została odnaleziona. |
      | xx     | Requested page was not found.   |

It should have methods to set up locale directly in code with app()->locale() and adding a proper header to the HTTP request.