updated tests

This commit is contained in:
ArnabChatterjee20k
2026-04-16 14:13:01 +05:30
parent d84f71e728
commit e7072574ad
2 changed files with 9 additions and 12 deletions
@@ -277,9 +277,6 @@ class Create extends Action
$key = $attribute['key'];
$type = $attribute['type'];
switch ($type) {
case Database::VAR_INTEGER:
$size = 4;
break;
case Database::VAR_BIGINT:
$size = 8;
break;
@@ -75,9 +75,9 @@ class DatabasesNumericTypesTest extends Scope
$this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/bigint', $headers, [
'key' => 'bigint_field',
'required' => false,
'min' => -900719925,
'max' => 900719925,
'default' => 123,
'min' => -9007199254740991,
'max' => 9007199254740991,
'default' => 9007199254740000,
]);
// Cache before waiting so that if waitForAllAttributes times out,
@@ -139,9 +139,9 @@ class DatabasesNumericTypesTest extends Scope
$this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/bigint', $headers, [
'key' => 'bigint_field',
'required' => false,
'min' => -900719925,
'max' => 900719925,
'default' => 123,
'min' => -9007199254740991,
'max' => 9007199254740991,
'default' => 9007199254740000,
]);
$this->waitForAllAttributes($databaseId, $tableId);
@@ -213,9 +213,9 @@ class DatabasesNumericTypesTest extends Scope
$this->assertEquals('bigint', $bigintColumn['body']['type']);
$this->assertEquals(false, $bigintColumn['body']['required']);
$this->assertEquals(false, $bigintColumn['body']['array']);
$this->assertEquals(-900719925, $bigintColumn['body']['min']);
$this->assertEquals(900719925, $bigintColumn['body']['max']);
$this->assertEquals(123, $bigintColumn['body']['default']);
$this->assertEquals(-9007199254740991, $bigintColumn['body']['min']);
$this->assertEquals(9007199254740991, $bigintColumn['body']['max']);
$this->assertEquals(9007199254740000, $bigintColumn['body']['default']);
}
public function testListColumnsWithNumericTypes(): void