ConfigTest.php 797 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Test\Unit\Translate\Js;
  7. use Magento\Framework\Translate\Js\Config;
  8. /**
  9. * Class ConfigTest
  10. */
  11. class ConfigTest extends \PHPUnit\Framework\TestCase
  12. {
  13. /**
  14. * @return void
  15. */
  16. public function testDefault()
  17. {
  18. $config = new Config();
  19. $this->assertFalse($config->dictionaryEnabled());
  20. $this->assertNull($config->getDictionaryFileName());
  21. }
  22. /**
  23. * @return void
  24. */
  25. public function testCustom()
  26. {
  27. $path = 'path';
  28. $config = new Config(true, $path);
  29. $this->assertTrue($config->dictionaryEnabled());
  30. $this->assertEquals($path, $config->getDictionaryFileName());
  31. }
  32. }