<?php/**
* @file
* Definition of Drupal\locale\Tests\LocaleInstallTest.
*/namespaceDrupal\locale\Tests;
useDrupal\simpletest\WebTestBase;
useReflectionFunction;
/**
* Tests for the st() function.
*/class LocaleInstallTestextends WebTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array(
'locale',
);
public static functiongetInfo() {
returnarray(
'name' => 'String translation using st()',
'description' => 'Tests that st() works like t().',
'group' => 'Locale',
);
}
functionsetUp() {
parent::setUp();
// st() lives in install.inc, so ensure that it is loaded for all tests.require_once DRUPAL_ROOT . '/core/includes/install.inc';
}
/**
* Verify that function signatures of t() and st() are equal.
*/functiontestFunctionSignatures() {
$reflector_t = newReflectionFunction('t');
$reflector_st = newReflectionFunction('st');
$this
->assertEqual($reflector_t
->getParameters(), $reflector_st
->getParameters(), t('Function signatures of t() and st() are equal.'));
}
}