public function testDateConvertToStringUsingFormatMethod() { $date = new qCal_Date(2010, 1, 10); $date->setFormat("Y"); //echo $date; // outputs "2010" $date->setFormat('l, F \\the jS, Y'); //echo $date; // outputs "Sunday, January the 10th, 2010" }
/** * Any of the setters in the object will return the object itself */ public function testFluidMethods() { $date = new qCal_Date(2009, 12, 17); $this->assertEqual($date->setFormat("m/d/Y")->__toString(), "12/17/2009"); }