Browse Source

Test to show that marshalling a null value with fieldlist fails

Walther Lalk 11 years ago
parent
commit
6b902c512b
1 changed files with 4 additions and 3 deletions
  1. 4 3
      tests/TestCase/ORM/MarshallerTest.php

+ 4 - 3
tests/TestCase/ORM/MarshallerTest.php

@@ -1245,7 +1245,7 @@ class MarshallerTest extends TestCase
         $data = [
             'title' => 'My title',
             'body' => 'My content',
-            'author_id' => 1
+            'author_id' => null
         ];
         $marshall = new Marshaller($this->articles);
         $result = $marshall->one($data, ['fieldList' => ['title', 'author_id']]);
@@ -1264,12 +1264,13 @@ class MarshallerTest extends TestCase
     {
         $data = [
             'title' => 'My title',
+            'body' => null,
             'author_id' => 1
         ];
         $marshall = new Marshaller($this->articles);
         $entity = new Entity([
             'title' => 'Foo',
-            'body' => 'My Content',
+            'body' => 'My content',
             'author_id' => 2
         ]);
         $entity->accessible('*', false);
@@ -1279,7 +1280,7 @@ class MarshallerTest extends TestCase
 
         $expected = [
             'title' => 'My title',
-            'body' => 'My Content',
+            'body' => null,
             'author_id' => 2
         ];