Browse Source

Update tests to not use deprecated usage.

ADmad 6 years ago
parent
commit
123f47c6e4

+ 2 - 2
tests/TestCase/View/Form/EntityContextTest.php

@@ -141,10 +141,10 @@ class EntityContextTest extends TestCase
         ]);
         $this->assertTrue($context->isCreate());
 
-        $row->isNew(false);
+        $row->setNew(false);
         $this->assertFalse($context->isCreate());
 
-        $row->isNew(true);
+        $row->setNew(true);
         $this->assertTrue($context->isCreate());
     }
 

+ 1 - 1
tests/TestCase/View/Helper/FormHelperTest.php

@@ -4389,7 +4389,7 @@ class FormHelperTest extends TestCase
         $this->assertHtml($expected, $result);
 
         // Default value from schema is used only for new entities.
-        $entity->isNew(false);
+        $entity->setNew(false);
         $result = $this->Form->text('title');
         $expected = ['input' => ['type' => 'text', 'name' => 'title']];
         $this->assertHtml($expected, $result);