$c = new sfCultureInfo('fr_FR'); $t->is($c->getEnglishName(), 'French (France)', '->getEnglishName() returns the english name of the current culture'); $c = new sfCultureInfo('fr'); $t->is($c->getEnglishName(), 'French', '->getEnglishName() returns the english name of the current culture'); $t->is($c->getEnglishName(), $c->EnglishName, '->getEnglishName() is equivalent to ->EnglishName'); // ->getNativeName() $t->diag('->getNativeName()'); $c = new sfCultureInfo('fr_FR'); $t->is($c->getNativeName(), 'français (France)', '->getNativeName() returns the native name of the current culture'); $c = new sfCultureInfo('fr'); $t->is($c->getNativeName(), 'français', '->getNativeName() returns the native name of the current culture'); $t->is($c->getNativeName(), $c->NativeName, '->getNativeName() is equivalent to ->NativeName'); // ->getCalendar() $t->diag('->getCalendar()'); $c = new sfCultureInfo('fr'); $t->is($c->getCalendar(), 'gregorian', '->getCalendar() returns the default calendar'); $t->is($c->getCalendar(), $c->Calendar, '->getCalendar() is equivalent to ->Calendar'); // __get() $t->diag('__get()'); try { $c->NonExistant; $t->fail('__get() throws an exception if the property does not exist'); } catch (sfException $e) { $t->pass('__get() throws an exception if the property does not exist'); } // __set() $t->diag('__set()'); try { $c->NonExistant = 12; $t->fail('__set() throws an exception if the property does not exist'); } catch (sfException $e) {