public function testSetDependencies() { $deps = ['de-DE' => 'en-US', 'de-CH' => 'de-DE', 'ja-JP' => 'en-US']; PropelL10n::setDependencies($deps); $this->assertEquals(2, PropelL10n::countDependencies('de-CH')); $this->assertEquals(0, PropelL10n::countDependencies('it-IT')); $this->assertEquals($deps, PropelL10n::getDependencies()); }
public static function setUpBeforeClass() { if (!class_exists('\\Product')) { $schema = <<<EOF <database name="l10n_behavior"> \t<table name="product"> \t\t<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" /> \t\t<column name="title" type="VARCHAR" required="true" /> \t\t \t\t<behavior name="l10n"> \t\t\t<parameter name="i18n_columns" value="title" /> \t\t</behavior> \t</table> </database> EOF; QuickBuilder::buildSchema($schema); } PropelL10n::setLocale('en'); // just reset, may changed in other tests PropelL10n::setFallback('en'); PropelL10n::setDependencies(['de-CH' => 'de-DE', 'de-AT' => 'de-DE', 'de-DE' => 'en-US', 'ja' => 'en-US']); }