mirror of
				https://github.com/Icinga/icingaweb2.git
				synced 2025-11-04 05:05:01 +01:00 
			
		
		
		
	Translating strings must not throw an exception even if the given domain is not valid. fixes #6432
		
			
				
	
	
		
			24 lines
		
	
	
		
			579 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			579 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
// {{{ICINGA_LICENSE_HEADER}}}
 | 
						|
// {{{ICINGA_LICENSE_HEADER}}}
 | 
						|
 | 
						|
namespace Tests\Icinga\Regression;
 | 
						|
 | 
						|
use Icinga\Test\BaseTestCase;
 | 
						|
use Icinga\Util\Translator;
 | 
						|
 | 
						|
/**
 | 
						|
 * Regression-Test for bug #6432
 | 
						|
 *
 | 
						|
 * Translating strings must not throw an exception even if the given domain is not valid.
 | 
						|
 *
 | 
						|
 * @see https://dev.icinga.org/issues/6432
 | 
						|
 */
 | 
						|
class Bug6432Test extends BaseTestCase
 | 
						|
{
 | 
						|
    public function testWhetherTranslateReturnsTheInputStringInCaseTheGivenDomainIsNotValid()
 | 
						|
    {
 | 
						|
        $this->assertEquals('test', Translator::translate('test', 'invalid_domain'));
 | 
						|
    }
 | 
						|
}
 |