Browse Source

Add created tag field to all other tests using the tags table

Walther Lalk 9 years ago
parent
commit
e0cdb64d6d

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

@@ -3136,12 +3136,14 @@ class MarshallerTest extends TestCase
                 [
                     'id' => 1,
                     'name' => 'tag1',
-                    'description' => 'A big description'
+                    'description' => 'A big description',
+                    'created' => new Time('2016-01-01 00:00'),
                 ],
                 [
                     'id' => 2,
                     'name' => 'tag2',
-                    'description' => 'Another big description'
+                    'description' => 'Another big description',
+                    'created' => new Time('2016-01-01 00:00'),
                 ]
             ]
         ];

+ 13 - 5
tests/TestCase/ORM/QueryTest.php

@@ -570,13 +570,15 @@ class QueryTest extends TestCase
                         'id' => 1,
                         'name' => 'tag1',
                         '_joinData' => ['article_id' => 1, 'tag_id' => 1],
-                        'description' => 'A big description'
+                        'description' => 'A big description',
+                        'created' => new Time('2016-01-01 00:00'),
                     ],
                     [
                         'id' => 2,
                         'name' => 'tag2',
                         '_joinData' => ['article_id' => 1, 'tag_id' => 2],
-                        'description' => 'Another big description'
+                        'description' => 'Another big description',
+                        'created' => new Time('2016-01-01 00:00'),
                     ]
                 ]
             ],
@@ -591,13 +593,15 @@ class QueryTest extends TestCase
                         'id' => 1,
                         'name' => 'tag1',
                         '_joinData' => ['article_id' => 2, 'tag_id' => 1],
-                        'description' => 'A big description'
+                        'description' => 'A big description',
+                        'created' => new Time('2016-01-01 00:00'),
                     ],
                     [
                         'id' => 3,
                         'name' => 'tag3',
                         '_joinData' => ['article_id' => 2, 'tag_id' => 3],
-                        'description' => 'Yet another one'
+                        'description' => 'Yet another one',
+                        'created' => new Time('2016-01-01 00:00'),
                     ]
                 ]
             ],
@@ -636,7 +640,8 @@ class QueryTest extends TestCase
                         'id' => 3,
                         'name' => 'tag3',
                         '_joinData' => ['article_id' => 2, 'tag_id' => 3],
-                        'description' => 'Yet another one'
+                        'description' => 'Yet another one',
+                        'created' => new Time('2016-01-01 00:00'),
                     ]
                 ]
             ],
@@ -751,6 +756,7 @@ class QueryTest extends TestCase
                         'id' => 3,
                         'name' => 'tag3',
                         'description' => 'Yet another one',
+                        'created' => new Time('2016-01-01 00:00'),
                     ],
                     'ArticlesTags' => ['article_id' => 2, 'tag_id' => 3]
                 ]
@@ -777,6 +783,7 @@ class QueryTest extends TestCase
                         'id' => 2,
                         'name' => 'tag2',
                         'description' => 'Another big description',
+                        'created' => new Time('2016-01-01 00:00'),
                     ],
                     'ArticlesTags' => ['article_id' => 1, 'tag_id' => 2]
                 ]
@@ -814,6 +821,7 @@ class QueryTest extends TestCase
                         'id' => 2,
                         'name' => 'tag2',
                         'description' => 'Another big description',
+                        'created' => new Time('2016-01-01 00:00'),
                     ],
                     'articles' => [
                         'id' => 1,

+ 2 - 1
tests/TestCase/ORM/TableTest.php

@@ -3966,7 +3966,8 @@ class TableTest extends TestCase
 
         $newTag = new \TestApp\Model\Entity\Tag([
             'name' => 'Foo',
-            'description' => 'Foo desc'
+            'description' => 'Foo desc',
+            'created' => null,
         ], $source);
         $tags[] = new \TestApp\Model\Entity\Tag([
             'id' => 3