Example #1
0
 /**
  * @depends	testInterface
  * @return	null
  */
 public function testExtractDataTypeMalformedParentheses()
 {
     $error = 'parse error: malformed parenthese pair start detected at ';
     $error .= '-(7) close detected at -(28)';
     $str = 'integer(8 not null default 9)';
     $this->assertFalse($this->parser->extractDataType($str));
     $this->assertTrue($this->parser->isError());
     $this->assertEquals($error, $this->parser->getError());
     $str = 'integer(8 not null default 9';
     $error = 'parse error: malformed parenthese pair start detected at ';
     $error .= '-(7) close detected at -()';
     $this->parser->clearError();
     $this->assertFalse($this->parser->extractDataType($str));
     $this->assertTrue($this->parser->isError());
     $this->assertEquals($error, $this->parser->getError());
     $str = 'integer8) not null default(9)';
     $error = 'parse error: malformed parenthese pair start detected at ';
     $error .= '-(26) close detected at -(8)';
     $this->parser->clearError();
     $this->assertFalse($this->parser->extractDataType($str));
     $this->assertTrue($this->parser->isError());
     $this->assertEquals($error, $this->parser->getError());
 }