Permalink
Browse files

Merge branch '2.0' of github.com:cakephp/cakephp into 2.0

  • Loading branch information...
2 parents 9aa2a42 + 734495d commit f79fc74aade5670885dd284adb50af87eac16bb4 @lorenzo lorenzo committed Jun 21, 2011
Showing with 7 additions and 12 deletions.
  1. +1 −1 lib/Cake/Model/Datasource/Database/Sqlserver.php
  2. +6 −11 lib/Cake/Test/Case/Utility/FileTest.php
@@ -192,7 +192,7 @@ public function describe($model) {
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) {
@@ -475,17 +475,12 @@ function _getTmpFile($paintSkip = true) {
};
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));
-
- $message = __d('cake_dev', '[FileTest] Skipping %s because "%s" not writeable!', $caller, $shortPath).$assertLine;
- $this->_reporter->paintSkip($message);
+ $trace = debug_backtrace();
+ $caller = $trace[0]['function'];
+ $shortPath = dirname($tmpFile);
+
+ $message = __d('cake_dev', '[FileTest] Skipping %s because "%s" not writeable!', $caller, $shortPath);
+ $this->markTestSkipped($message);
}
return false;
}

0 comments on commit f79fc74

Please sign in to comment.