Skip to content

Commit

Permalink
Merge pull request #1569 from Devolicious/fix/phpunit
Browse files Browse the repository at this point in the history
[TranslatorBundle] revert fix #1562 with new solution
  • Loading branch information
Devolicious authored Aug 1, 2017
2 parents 9201534 + a24b8be commit 6fb1855
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ services:
kunstmaan_translator.service.translator.loader:
class: Kunstmaan\TranslatorBundle\Service\Translator\Loader
tags:
- { name: 'translation.loader', alias: 'yml' }
- { name: 'translation.loader', alias: 'database' }
calls:
- [setTranslationRepository, ['@kunstmaan_translator.repository.translation']]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testImportExistingDomainFileNonForced()
}

$translation = $this->translationRepository->findOneBy(array('keyword' => 'headers.frontpage', 'locale' => 'en'));
$this->assertEquals('FrontPage', $translation->getText());
$this->assertEquals('a not yet updated frontpage header', $translation->getText());
}

/**
Expand All @@ -53,7 +53,7 @@ public function testImportExistingDomainFileForced()
}

$translation = $this->translationRepository->findOneBy(array('keyword' => 'headers.frontpage', 'locale' => 'en'));
$this->assertEquals('a not yet updated frontpage header', $translation->getText());
$this->assertEquals('FrontPage', $translation->getText());
}

public function getNewDomainTestFinder()
Expand Down
6 changes: 6 additions & 0 deletions src/Kunstmaan/TranslatorBundle/Tests/app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ framework:
session: ~
fragments: ~

services:
translation.loader.yml:
class: Symfony\Component\Translation\Loader\YamlFileLoader
tags:
- { name: translation.loader, alias: yml }

kunstmaan_translator:
managed_locales: ['nl','en','de']
cache_dir: "%kernel.cache_dir%/translations"
Expand Down

0 comments on commit 6fb1855

Please sign in to comment.