From 48386b791f61e1ce8f99e1198c09a36de3059635 Mon Sep 17 00:00:00 2001 From: "renan.saddam" Date: Tue, 28 Apr 2009 22:20:04 +0000 Subject: [PATCH] Fixing cake_test_fixture and dbo_mssql tests. Refs #6135. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8159 3807eeeb-6ff5-0310-8944-8be069107fe0 --- .../cases/libs/cake_test_fixture.test.php | 4 +-- .../model/datasources/dbo/dbo_mssql.test.php | 29 +------------------ 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/cake/tests/cases/libs/cake_test_fixture.test.php b/cake/tests/cases/libs/cake_test_fixture.test.php index 5e17ed25b..03a712a56 100644 --- a/cake/tests/cases/libs/cake_test_fixture.test.php +++ b/cake/tests/cases/libs/cake_test_fixture.test.php @@ -51,8 +51,8 @@ class CakeTestFixtureTestFixture extends CakeTestFixture { */ var $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), - 'name' => array('type' => 'text', 'length' => '255'), - 'created' => array('type' => 'datetime'), + 'name' => array('type' => 'string', 'length' => '255'), + 'created' => array('type' => 'datetime') ); /** * Records property diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php index d2c3411f7..319f2f134 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php @@ -36,32 +36,6 @@ require_once LIBS.'model'.DS.'datasources'.DS.'dbo'.DS.'dbo_mssql.php'; * @subpackage cake.tests.cases.libs.model.datasources.dbo */ class DboMssqlTestDb extends DboMssql { -/** - * Contructor - * - * @return void - * @access public - */ - function __construct() { - } -/** - * connect method - * - * @return boolean - * @access public - */ - function connect() { - $this->connected = true; - return true; - } -/** - * lastError method - * - * @return void - * @access public - */ - function lastError() { - } /** * simulated property * @@ -346,10 +320,9 @@ class DboMssqlTest extends CakeTestCase { * @access public */ function testUpdateAllSyntax() { - $model = ClassRegistry::init('MssqlTestModel'); $fields = array('MssqlTestModel.client_id' => '[MssqlTestModel].[client_id] + 1'); $conditions = array('MssqlTestModel.updated <' => date('2009-01-01 00:00:00')); - $this->db->update($model, $fields, null, $conditions); + $this->db->update($this->model, $fields, null, $conditions); $result = $this->db->getLastQuery(); $this->assertNoPattern('/MssqlTestModel/', $result);