@@ -123,17 +123,55 @@ public function testGeneratesTypeDeclarationsForStrings(): void
123
123
'NVARCHAR(50) ' ,
124
124
$ this ->platform ->getStringTypeDeclarationSQL (['length ' => 50 ]),
125
125
);
126
+ self ::assertEquals (
127
+ 'NVARCHAR(50) ' ,
128
+ $ this ->platform ->getStringTypeDeclarationSQL (
129
+ ['length ' => 50 , 'fixed ' => false ],
130
+ ),
131
+ );
126
132
self ::assertEquals (
127
133
'NVARCHAR(255) ' ,
128
134
$ this ->platform ->getStringTypeDeclarationSQL ([]),
129
135
);
136
+ self ::assertEquals (
137
+ 'NVARCHAR(255) ' ,
138
+ $ this ->platform ->getStringTypeDeclarationSQL (['fixed ' => false ]),
139
+ );
130
140
self ::assertSame ('VARCHAR(MAX) ' , $ this ->platform ->getClobTypeDeclarationSQL ([]));
131
141
self ::assertSame (
132
142
'VARCHAR(MAX) ' ,
133
143
$ this ->platform ->getClobTypeDeclarationSQL (['length ' => 5 , 'fixed ' => true ]),
134
144
);
135
145
}
136
146
147
+ public function testGeneratesTypeDeclarationsForAsciiStrings (): void
148
+ {
149
+ self ::assertEquals (
150
+ 'CHAR(10) ' ,
151
+ $ this ->platform ->getAsciiStringTypeDeclarationSQL (
152
+ ['length ' => 10 , 'fixed ' => true ],
153
+ ),
154
+ );
155
+ self ::assertEquals (
156
+ 'VARCHAR(50) ' ,
157
+ $ this ->platform ->getAsciiStringTypeDeclarationSQL (['length ' => 50 ]),
158
+ );
159
+ self ::assertEquals (
160
+ 'VARCHAR(50) ' ,
161
+ $ this ->platform ->getAsciiStringTypeDeclarationSQL (
162
+ ['length ' => 50 , 'fixed ' => false ],
163
+ ),
164
+ );
165
+ self ::assertEquals (
166
+ 'VARCHAR(255) ' ,
167
+ $ this ->platform ->getAsciiStringTypeDeclarationSQL ([]),
168
+ );
169
+ self ::assertEquals (
170
+ 'VARCHAR(255) ' ,
171
+ $ this ->platform ->getAsciiStringTypeDeclarationSQL (['fixed ' => false ]),
172
+ );
173
+ }
174
+
137
175
public function testPrefersIdentityColumns (): void
138
176
{
139
177
self ::assertTrue ($ this ->platform ->prefersIdentityColumns ());
0 commit comments