diff --git a/cake/console/libs/tasks/model.php b/cake/console/libs/tasks/model.php index 2d75be9ba..b962a13df 100644 --- a/cake/console/libs/tasks/model.php +++ b/cake/console/libs/tasks/model.php @@ -870,6 +870,7 @@ class ModelTask extends Shell { case 'integer': $insert = 1; break; + case 'binary': case 'string'; $insert = "Lorem ipsum dolor sit amet"; if (!empty($value['length'])) { diff --git a/cake/tests/cases/console/libs/tasks/model.test.php b/cake/tests/cases/console/libs/tasks/model.test.php index b273b69cc..a2e7f5c54 100644 --- a/cake/tests/cases/console/libs/tasks/model.test.php +++ b/cake/tests/cases/console/libs/tasks/model.test.php @@ -53,7 +53,7 @@ Mock::generatePartial( * @subpackage cake.tests.cases.console.libs.tasks */ class ModelTaskTest extends CakeTestCase { - var $fixtures = array('core.datatype'); + var $fixtures = array('core.datatype', 'core.binary_test'); /** * setUp method * @@ -84,7 +84,9 @@ class ModelTaskTest extends CakeTestCase { $this->Task->setReturnValue('createFile', true); $result = $this->Task->fixture('Datatype'); $this->assertPattern('/float_field\' => 1/', $result); - + + $result = $this->Task->fixture('BinaryTest'); + $this->assertPattern("/'data' => 'Lorem ipsum dolor sit amet'/", $result); } } ?> \ No newline at end of file