@@ -106,7 +106,7 @@ public function testAddColumnWithDefaultValue(): void
106
106
$ schema ->string ('new_column ' )->defaultValue ('some_value ' );
107
107
$ schema ->save ();
108
108
109
- $ this ->assertInternalType ( ' array ' , $ schema ->string ('new_column ' )->__debugInfo ());
109
+ $ this ->assertIsArray ( $ schema ->string ('new_column ' )->__debugInfo ());
110
110
111
111
$ this ->assertSameAsInDB ($ schema );
112
112
}
@@ -137,28 +137,25 @@ public function testMakeNullable(): void
137
137
$ this ->assertTrue ($ this ->fetchSchema ($ schema )->column ('first_name ' )->isNullable ());
138
138
}
139
139
140
- /**
141
- * @expectedException \Spiral\Database\Exception\SchemaException
142
- */
143
140
public function testColumnSizeException (): void
144
141
{
142
+ $ this ->expectException (\Spiral \Database \Exception \SchemaException::class);
145
143
$ schema = $ this ->sampleSchema ('table ' );
146
144
$ this ->assertTrue ($ schema ->exists ());
147
145
148
146
$ schema ->string ('first_name ' , -1 );
149
147
$ schema ->save ();
150
148
}
151
149
152
- /**
153
- * @expectedException \Spiral\Database\Exception\SchemaException
154
- */
155
150
public function testColumnSize2Exception (): void
156
151
{
157
152
$ schema = $ this ->sampleSchema ('table ' );
158
153
$ this ->assertTrue ($ schema ->exists ());
159
154
160
155
$ schema ->string ('first_name ' , 256 );
161
- $ schema ->save ();
156
+
157
+ // No limit error
158
+ $ this ->assertTrue (true );
162
159
}
163
160
164
161
public function testChangeSize (): void
@@ -187,14 +184,12 @@ public function testDecimalSizes(): void
187
184
$ this ->assertSame (10 , $ this ->fetchSchema ($ schema )->column ('double_2 ' )->getPrecision ());
188
185
$ this ->assertSame (1 , $ this ->fetchSchema ($ schema )->column ('double_2 ' )->getScale ());
189
186
190
- $ this ->assertInternalType ( ' array ' , $ schema ->decimal ('double_2 ' , 10 , 1 )->__debugInfo ());
187
+ $ this ->assertIsArray ( $ schema ->decimal ('double_2 ' , 10 , 1 )->__debugInfo ());
191
188
}
192
189
193
- /**
194
- * @expectedException \Spiral\Database\Exception\SchemaException
195
- */
196
190
public function testDecimalSizesException (): void
197
191
{
192
+ $ this ->expectException (\Spiral \Database \Exception \SchemaException::class);
198
193
$ schema = $ this ->sampleSchema ('table ' );
199
194
$ this ->assertTrue ($ schema ->exists ());
200
195
0 commit comments