Skip to content
Permalink
Browse files

Add test to ensure column was converted to integer.

Refs #5512
  • Loading branch information...
markstory committed Mar 15, 2015
1 parent e5fc185 commit c32e5559bb01c043ec45ab8e25b2307de721cff3
@@ -1,7 +1,5 @@
<?php
/**
* PostgreSQL layer for DBO.
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
@@ -754,9 +754,17 @@ public function testAlterSchemaTextToIntegerField() {
$modified['text_fields']['active'] = array('type' => 'integer', 'null' => true);
$New = new CakeSchema($modified);
$query = $this->Dbo->alterSchema($New->compare($Old));
$result = $this->Dbo->query($query);
$this->Dbo->query($this->Dbo->alterSchema($New->compare($Old)));
$result = $this->Dbo->describe('text_fields');
$this->Dbo->query($this->Dbo->dropSchema($Old));
$expected = array(
'type' => 'integer',
'null' => true,
'default' => null,
'length' => null,
);
$this->assertEquals($expected, $result['active']);
}
/**

0 comments on commit c32e555

Please sign in to comment.
You can’t perform that action at this time.