NativeLabelTranslatorStrategyTest.php 919 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /*
  3. * This file is part of the Sonata package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sonata\AdminBundle\Tests\Translator;
  11. use Sonata\AdminBundle\Translator\NativeLabelTranslatorStrategy;
  12. class NativeTranslatorStrategyTest extends \PHPUnit_Framework_TestCase
  13. {
  14. public function testLabel()
  15. {
  16. $strategy = new NativeLabelTranslatorStrategy;
  17. $this->assertEquals('Is Valid', $strategy->getLabel('isValid', 'form', 'label'));
  18. $this->assertEquals('Is Valid', $strategy->getLabel('is_Valid', 'form', 'label'));
  19. $this->assertEquals('Is0 Valid', $strategy->getLabel('is0Valid', 'form', 'label'));
  20. $this->assertEquals('Is Valid Super Cool', $strategy->getLabel('isValid_SuperCool', 'form', 'label'));
  21. }
  22. }