Пример #1
0
 /**
  * ZF-6457
  */
 public function testArrayVerification()
 {
     $date = new Date\Date();
     $array = $date->toArray();
     $this->assertTrue($this->_validator->isValid($array), "array expected to be valid");
 }
Пример #2
0
 public function testToArray()
 {
     $date = new Date('2006-01-02 23:58:59', Date::ISO_8601, 'en_US');
     $return = $date->toArray();
     $orig = array('day' => 02, 'month' => 01, 'year' => 2006, 'hour' => 23, 'minute' => 58, 'second' => 59, 'timezone' => 'MVT', 'timestamp' => 1136228339, 'weekday' => 1, 'dayofyear' => 1, 'week' => '01', 'gmtsecs' => 18000);
     $this->assertEquals($orig, $return);
 }