SimpleSAML\Test\Locale\TranslateTest::testTFallback PHP Метод

testTFallback() публичный Метод

Test SimpleSAML\Locale\Translate::t().
public testTFallback ( )
    public function testTFallback()
    {
        $c = \SimpleSAML_Configuration::loadFromArray(array());
        $t = new Translate($c);
        $testString = 'Blablabla';
        // $fallbackdefault = true
        $result = 'not translated (' . $testString . ')';
        $this->assertEquals($result, $t->t($testString));
        // $fallbackdefault = false, should be a noop
        $this->assertEquals($testString, $t->t($testString, array(), false));
    }