From f353eb733fd4b12ba5cac531bd1839c031a4e759 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Tue, 21 Jun 2011 14:00:28 -0700 Subject: [PATCH 1/2] Fixing incorrect default value. --- lib/Cake/Model/Datasource/Database/Sqlserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Model/Datasource/Database/Sqlserver.php b/lib/Cake/Model/Datasource/Database/Sqlserver.php index 32bc68f6e..ac47d3f45 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlserver.php +++ b/lib/Cake/Model/Datasource/Database/Sqlserver.php @@ -192,7 +192,7 @@ class Sqlserver extends DboSource { if ($cache != null) { return $cache; } - $fields = false; + $fields = array(); $table = $this->fullTableName($model, false); $cols = $this->_execute("SELECT COLUMN_NAME as Field, DATA_TYPE as Type, COL_LENGTH('" . $table . "', COLUMN_NAME) as Length, IS_NULLABLE As [Null], COLUMN_DEFAULT as [Default], COLUMNPROPERTY(OBJECT_ID('" . $table . "'), COLUMN_NAME, 'IsIdentity') as [Key], NUMERIC_SCALE as Size FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '" . $table . "'"); if (!$cols) { From 734495d0c72a97e52d31307721a85c1dfcd4d8ba Mon Sep 17 00:00:00 2001 From: Mark Story Date: Tue, 21 Jun 2011 14:20:04 -0700 Subject: [PATCH 2/2] Removing bogus code that doesn't work when tests fail. --- lib/Cake/Test/Case/Utility/FileTest.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/Cake/Test/Case/Utility/FileTest.php b/lib/Cake/Test/Case/Utility/FileTest.php index 80eaaeaa2..c976b87a8 100644 --- a/lib/Cake/Test/Case/Utility/FileTest.php +++ b/lib/Cake/Test/Case/Utility/FileTest.php @@ -475,17 +475,12 @@ class FileTest extends CakeTestCase { }; if ($paintSkip) { - $caller = 'test'; - if (function_exists('debug_backtrace')) { - $trace = debug_backtrace(); - $caller = $trace[1]['function'] . '()'; - } - $assertLine = new SimpleStackTrace(array(__FUNCTION__)); - $assertLine = $assertLine->traceMethod(); - $shortPath = substr($tmpFile, strlen(ROOT)); + $trace = debug_backtrace(); + $caller = $trace[0]['function']; + $shortPath = dirname($tmpFile); - $message = __d('cake_dev', '[FileTest] Skipping %s because "%s" not writeable!', $caller, $shortPath).$assertLine; - $this->_reporter->paintSkip($message); + $message = __d('cake_dev', '[FileTest] Skipping %s because "%s" not writeable!', $caller, $shortPath); + $this->markTestSkipped($message); } return false; }