Browse Source

Simplify testing

bancer 6 years ago
parent
commit
8d3389ef52
1 changed files with 5 additions and 22 deletions
  1. 5 22
      tests/TestCase/Database/Schema/MysqlSchemaTest.php

+ 5 - 22
tests/TestCase/Database/Schema/MysqlSchemaTest.php

@@ -689,6 +689,11 @@ SQL;
                 '`value` FLOAT UNSIGNED'
             ],
             [
+                'latitude',
+                ['type' => 'float', 'length' => 53, 'null' => true, 'default' => null, 'unsigned' => true],
+                '`latitude` FLOAT(53) UNSIGNED',
+            ],
+            [
                 'value',
                 ['type' => 'float', 'length' => 11, 'precision' => 3],
                 '`value` FLOAT(11,3)'
@@ -781,28 +786,6 @@ SQL;
     }
 
     /**
-     * Test generating column definitions
-     *
-     * @return void
-     */
-    public function testColumnSqlFloat()
-    {
-        $expected = '`latitude` FLOAT(53) UNSIGNED';
-        $driver = $this->_getMockedDriver();
-        $schema = new MysqlSchema($driver);
-        $name = 'latitude';
-        $data = [
-            'type' => 'float',
-            'length' => 53,
-            'null' => true,
-            'default' => null,
-            'unsigned' => true,
-        ];
-        $table = (new TableSchema('articles'))->addColumn($name, $data);
-        $this->assertEquals($expected, $schema->columnSql($table, $name));
-    }
-
-    /**
      * Provide data for testing constraintSql
      *
      * @return array