Permalink
Browse files

Merge branch '1.3-dev' into 1.3

  • Loading branch information...
2 parents 788cae1 + 74e6b30 commit 400e1b2e3be768fb5da268c7d078d971d7d815e3 gwoo committed Aug 3, 2009
@@ -47,13 +47,6 @@ class DboMssqlTestDb extends DboMssql {
*/
var $simulated = array();
-/**
- * simalate property
- *
- * @var array
- * @access public
- */
- var $simulate = true;
/**
* simalate property
*
@@ -193,17 +186,6 @@ class MssqlTestModel extends Model {
'updated' => array('type' => 'datetime', 'null' => '1', 'default' => '', 'length' => null)
);
-/**
- * belongsTo property
- *
- * @var array
- * @access public
- */
- var $belongsTo = array(
- 'MssqlClientTestModel' => array(
- 'foreignKey' => 'client_id'
- )
- );
/**
* belongsTo property
*
@@ -255,41 +237,6 @@ function setSchema($schema) {
}
}
-/**
- * MssqlClientTestModel class
- *
- * @package cake
- * @subpackage cake.tests.cases.libs.model.datasources
- */
-class MssqlClientTestModel extends Model {
-/**
- * name property
- *
- * @var string 'MssqlAssociatedTestModel'
- * @access public
- */
- var $name = 'MssqlClientTestModel';
-/**
- * useTable property
- *
- * @var bool false
- * @access public
- */
- var $useTable = false;
-/**
- * _schema property
- *
- * @var array
- * @access protected
- */
- var $_schema = array(
- 'id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8', 'key' => 'primary'),
- 'name' => array('type' => 'string', 'null' => '', 'default' => '', 'length' => '255'),
- 'email' => array('type' => 'string', 'null' => '1', 'default' => '', 'length' => '155'),
- 'created' => array('type' => 'datetime', 'null' => '1', 'default' => '', 'length' => ''),
- 'updated' => array('type' => 'datetime', 'null' => '1', 'default' => '', 'length' => null)
- );
-}
/**
* MssqlClientTestModel class
*
@@ -341,20 +288,6 @@ class DboMssqlTest extends CakeTestCase {
*/
var $db = null;
-/**
- * autoFixtures property
- *
- * @var bool false
- * @access public
- */
- var $autoFixtures = false;
-/**
- * fixtures property
- *
- * @var array
- * @access public
- */
- var $fixtures = array('core.category');
/**
* autoFixtures property
*
@@ -379,26 +312,6 @@ function skip() {
$this->skipUnless($this->db->config['driver'] == 'mssql', '%s SQL Server connection not available');
}
-/**
- * Make sure all fixtures tables are being created
- *
- * @access public
- */
- function start() {
- $this->db->simulate = false;
- parent::start();
- $this->db->simulate = true;
- }
-/**
- * Make sure all fixtures tables are being dropped
- *
- * @access public
- */
- function end() {
- $this->db->simulate = false;
- parent::end();
- $this->db->simulate = true;
- }
/**
* Make sure all fixtures tables are being created
*
@@ -573,65 +486,6 @@ function testDescribe() {
);
$this->assertEqual($result, $expected);
}
-
-/**
- * testBuildColumn
- *
- * @return unknown_type
- * @access public
- */
- function testBuildColumn() {
- $column = array('name' => 'id', 'type' => 'integer', 'null' => '', 'default' => '', 'length' => '8', 'key' => 'primary');
- $result = $this->db->buildColumn($column);
- $expected = '[id] int IDENTITY (1, 1) NOT NULL';
- $this->assertEqual($result, $expected);
-
- $column = array('name' => 'client_id', 'type' => 'integer', 'null' => '', 'default' => '0', 'length' => '11');
- $result = $this->db->buildColumn($column);
- $expected = '[client_id] int DEFAULT 0 NOT NULL';
- $this->assertEqual($result, $expected);
-
- $column = array('name' => 'client_id', 'type' => 'integer', 'null' => true);
- $result = $this->db->buildColumn($column);
- $expected = '[client_id] int NULL';
- $this->assertEqual($result, $expected);
-
- // 'name' => 'type' format for columns
- $column = array('type' => 'integer', 'name' => 'client_id');
- $result = $this->db->buildColumn($column);
- $expected = '[client_id] int NULL';
- $this->assertEqual($result, $expected);
-
- $column = array('type' => 'string', 'name' => 'name');
- $result = $this->db->buildColumn($column);
- $expected = '[name] varchar(255) NULL';
- $this->assertEqual($result, $expected);
-
- $column = array('name' => 'name', 'type' => 'string', 'null' => '', 'default' => '', 'length' => '255');
- $result = $this->db->buildColumn($column);
- $expected = '[name] varchar(255) DEFAULT \'\' NOT NULL';
- $this->assertEqual($result, $expected);
-
- $column = array('name' => 'name', 'type' => 'string', 'null' => false, 'length' => '255');
- $result = $this->db->buildColumn($column);
- $expected = '[name] varchar(255) NOT NULL';
- $this->assertEqual($result, $expected);
-
- $column = array('name' => 'name', 'type' => 'string', 'null' => false, 'default' => null, 'length' => '255');
- $result = $this->db->buildColumn($column);
- $expected = '[name] varchar(255) NOT NULL';
- $this->assertEqual($result, $expected);
-
- $column = array('name' => 'name', 'type' => 'string', 'null' => true, 'default' => null, 'length' => '255');
- $result = $this->db->buildColumn($column);
- $expected = '[name] varchar(255) NULL';
- $this->assertEqual($result, $expected);
-
- $column = array('name' => 'name', 'type' => 'string', 'null' => true, 'default' => '', 'length' => '255');
- $result = $this->db->buildColumn($column);
- $expected = '[name] varchar(255) DEFAULT \'\'';
- $this->assertEqual($result, $expected);
- }
/**
* testBuildColumn
*
@@ -231,8 +231,7 @@ function testLink() {
* @return void
*/
function testFilteringAndTimestamping() {
- if (!is_writable(JS)) {
- echo "<br />JavaScript directory not writable, skipping JS asset timestamp tests<br />";
+ if($this->skipIf(!is_writable(JS), "%s JavaScript directory not writable, skipping JS asset timestamp tests.")) {
return;
}
@@ -53,7 +53,7 @@ class DatabaseGroupTest extends GroupTest {
*/
function DatabaseGroupTest() {
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'db_acl');
- TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'schema');
+ TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'cake_schema');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'datasources' . DS . 'dbo_source');
}
}

0 comments on commit 400e1b2

Please sign in to comment.