Esempio n. 1
0
 /**
  * This controls the attribute used to determine if the sql string
  * will be returned all uppercase or all lowercase
  *
  * @return	null
  */
 public function testIsEnableDisableUpperCase()
 {
     $this->assertFalse($this->type->isUpperCase());
     $this->assertSame($this->type, $this->type->enableUpperCase(), 'uses a fluent interface');
     $this->assertTrue($this->type->isUpperCase());
     $this->assertSame($this->type, $this->type->disableUppercase(), 'uses a fluent interface');
     $this->assertFalse($this->type->isUpperCase());
 }
Esempio n. 2
0
 /**
  * @depends	testBuildSqlNoAttrsLowerCaseUpperCase
  * @return	null
  */
 public function testBuildSqlUnsignedZeroFillAutoIncrementDisplayWidth()
 {
     $this->assertFalse($this->type->isUpperCase());
     $this->type->enableUnsigned()->enableZeroFill()->enableAutoIncrement()->setDisplayWidth(4);
     $expected = "{$this->type->getSqlString()}(4) unsigned zerofill ";
     $expected .= "auto_increment";
     $this->assertEquals($expected, $this->type->buildSql());
     $this->type->enableUpperCase();
     $this->assertEquals(strtoupper($expected), $this->type->buildSql());
 }