Merge branch '1.3-dev' into 1.3

This commit is contained in:
gwoo 2009-08-02 20:13:22 -07:00
commit 400e1b2e3b
3 changed files with 2 additions and 149 deletions

View file

@ -47,13 +47,6 @@ class DboMssqlTestDb extends DboMssql {
*/ */
var $simulated = array(); var $simulated = array();
/**
* simalate property
*
* @var array
* @access public
*/
var $simulate = true;
/** /**
* simalate property * simalate property
* *
@ -193,17 +186,6 @@ class MssqlTestModel extends Model {
'updated' => array('type' => 'datetime', 'null' => '1', 'default' => '', 'length' => null) '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 * belongsTo property
* *
@ -255,41 +237,6 @@ class MssqlTestModel extends Model {
} }
} }
/**
* 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 * MssqlClientTestModel class
* *
@ -341,20 +288,6 @@ class DboMssqlTest extends CakeTestCase {
*/ */
var $db = null; 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 * autoFixtures property
* *
@ -379,26 +312,6 @@ class DboMssqlTest extends CakeTestCase {
$this->skipUnless($this->db->config['driver'] == 'mssql', '%s SQL Server connection not available'); $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 * Make sure all fixtures tables are being created
* *
@ -573,65 +486,6 @@ class DboMssqlTest extends CakeTestCase {
); );
$this->assertEqual($result, $expected); $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 * testBuildColumn
* *

View file

@ -231,8 +231,7 @@ class JavascriptTest extends CakeTestCase {
* @return void * @return void
*/ */
function testFilteringAndTimestamping() { function testFilteringAndTimestamping() {
if (!is_writable(JS)) { if($this->skipIf(!is_writable(JS), "%s JavaScript directory not writable, skipping JS asset timestamp tests.")) {
echo "<br />JavaScript directory not writable, skipping JS asset timestamp tests<br />";
return; return;
} }

View file

@ -53,7 +53,7 @@ class DatabaseGroupTest extends GroupTest {
*/ */
function DatabaseGroupTest() { 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 . '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'); TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'datasources' . DS . 'dbo_source');
} }
} }