$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) { $t->pass('__set() throws an exception if the property does not exist'); } // ->getDateTimeFormat() $t->diag('->getDateTimeFormat()'); $c = new sfCultureInfo(); $t->isa_ok($c->getDateTimeFormat(), 'sfDateTimeFormatInfo', '->getDateTimeFormat() returns a sfDateTimeFormatInfo instance'); // ->setDateTimeFormat() $t->diag('->setDateTimeFormat()'); $d = $c->getDateTimeFormat(); $c->setDateTimeFormat('yyyy'); $t->is($c->getDateTimeFormat(), 'yyyy', '->setDateTimeFormat() sets the sfDateTimeFormatInfo instance'); $c->DateTimeFormat = 'mm'; $t->is($c->getDateTimeFormat(), 'mm', '->setDateTimeFormat() is equivalent to ->DateTimeFormat = '); // ->getNumberFormat() $t->diag('->getNumberFormat()'); $c = new sfCultureInfo(); $t->isa_ok($c->getNumberFormat(), 'sfNumberFormatInfo', '->getNumberFormat() returns a sfNumberFormatInfo instance'); // ->setNumberFormat() $t->diag('->setNumberFormat()'); $d = $c->getNumberFormat(); $c->setNumberFormat('.');