$t->isa_ok($c->getParent(), 'sfCultureInfo', '->getParent() returns a sfCultureInfo instance'); $t->is($c->getParent()->getName(), 'fr', '->getParent() returns the parent culture'); $c = new sfCultureInfo('fr'); $t->is($c->getParent()->getName(), 'en', '->getParent() returns the invariant culture if the culture is neutral'); // ->getIsNeutralCulture() $t->diag('->getIsNeutralCulture()'); $c = new sfCultureInfo('fr_FR'); $t->is($c->getIsNeutralCulture(), false, '->getIsNeutralCulture() returns false if the culture is specific'); $c = new sfCultureInfo('fr'); $t->is($c->getIsNeutralCulture(), true, '->getIsNeutralCulture() returns true if the culture is neutral'); // ->getEnglishName() $t->diag('->getEnglishName()'); $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()');