Ejemplo n.º 1
0
 /**
  * @param $columnName
  * @return $this
  */
 public function addDateTimeColumn($columnName)
 {
     if (is_scalar($columnName)) {
         $column = new DateTime($this, $columnName);
     }
     if (is_array($columnName)) {
         $column = new DateTime($this, $columnName);
     }
     $this->columns[] = $column;
     $this->addJavascript($column->getJavascript(), $column->getName());
     return $this;
 }
Ejemplo n.º 2
0
 public function testDateTime()
 {
     $column = new DateTime($this->table, 'test');
     $date = date('Y-m-d H:i:s');
     $column->setData(['test' => $date]);
     $output = $column->getValue();
     $this->assertEquals($date, $output);
 }