2 declare(strict_types = 1);
55 'TIME with fractional second part' => [
62 TimestampDataType::class,
65 'TIMESTAMP with fractional second part' => [
67 TimestampDataType::class,
72 DateTimeDataType::class,
75 'DATETIME with fractional second part' => [
77 DateTimeDataType::class,
90 public function canParseDataType(
string $columnDefinition,
string $className,
int $length =
null)
94 $this->assertInstanceOf($className, $subject->dataType);
97 if ($length !==
null) {
98 $this->assertSame($length, $subject->dataType->getLength());
107 $this->expectException(StatementException::class);
108 if (method_exists($this,
'expectDeprecationMessageMatches')) {
109 $this->expectDeprecationMessageMatches(
110 '@Error: the fractional seconds part for TIME, DATETIME or TIMESTAMP columns must >= 0@'
113 $this->expectExceptionMessageRegExp(
114 '@Error: the fractional seconds part for TIME, DATETIME or TIMESTAMP columns must >= 0@'
125 $this->expectException(StatementException::class);
126 if (method_exists($this,
'expectDeprecationMessageMatches')) {
127 $this->expectDeprecationMessageMatches(
128 '@Error: the fractional seconds part for TIME, DATETIME or TIMESTAMP columns must <= 6@'
131 $this->expectExceptionMessageRegExp(
132 '@Error: the fractional seconds part for TIME, DATETIME or TIMESTAMP columns must <= 6@'