Exemplo n.º 1
0
 /**
  * @param	string	$attrs space delimited string of attributes
  * @return	TinyInt
  */
 public function __construct($attrs = null)
 {
     parent::__construct($attrs);
     $this->setSqlString('double');
     $this->setValidatorName('datatype-double');
 }
Exemplo n.º 2
0
 /**
  * @return	null
  */
 public function testBuildSqlAllAttributes()
 {
     $expected = 'float(7,4) unsigned zerofill auto_increment';
     $type = new Float('7,4 unsigned auto_increment zerofill');
     $this->assertEquals($expected, $type->buildSql());
     /* not the order of the attribute declaration in the string
      * does not matter, its always the same order in the resulting sql
      */
     $type = new Float('7,4 auto_increment zerofill unsigned');
     $this->assertEquals($expected, $type->buildSql());
     $type = new Float('zerofill auto_increment 7,4 unsigned');
     $this->assertEquals($expected, $type->buildSql());
 }