public function testDateTimesSerialize() { $r = new \ComplexColumnTypeEntity5(); $r->setBar3(new \DateTime('2011-11-23')); $str = serialize($r); $r2 = unserialize($str); $this->assertEquals('2011-11-23', $r2->getBar3('Y-m-d')); }
public function testTimestampPersistence() { $r = new ComplexColumnTypeEntity5(); $r->setBar3(new DateTime('1999-12-20 12:55')); $r->save(); ComplexColumnTypeEntity5Peer::clearInstancePool(); $r1 = ComplexColumnTypeEntity5Query::create()->findPk($r->getId()); $this->assertEquals('1999-12-20 12:55', $r1->getBar3(null)->format('Y-m-d H:i')); }