euromark 11 年之前
父节点
当前提交
18c646b0d5
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/Model/Behavior/BitmaskedBehavior.php
  2. 1 1
      tests/TestCase/Model/Behavior/JsonableBehaviorTest.php

+ 1 - 1
src/Model/Behavior/BitmaskedBehavior.php

@@ -179,7 +179,7 @@ class BitmaskedBehavior extends Behavior {
 				$foo->setValue($this->encodeBitmask($foo->getValue()));
 			}
 			if ($field !== $mappedField) {
-				$foo->field($field);
+				$foo->setField($field);
 			}
 
 			return $foo;

+ 1 - 1
tests/TestCase/Model/Behavior/JsonableBehaviorTest.php

@@ -216,7 +216,7 @@ class JsonableBehaviorTest extends TestCase {
 		$this->Comments->save($entity);
 
 		$res = $this->Comments->find('all', array('conditions' => array('title' => 'param')))->first();
-		debug($res);
+		debug($res); ob_flush();
 		$obj = new \stdClass();
 		$obj->y = 'z';
 		$expected = array('x' => $obj);