Browse Source

Remove use of TestCase::getMock() from "Form" namepace tests.

ADmad 9 years ago
parent
commit
352d01df70
1 changed files with 6 additions and 2 deletions
  1. 6 2
      tests/TestCase/Form/FormTest.php

+ 6 - 2
tests/TestCase/Form/FormTest.php

@@ -122,7 +122,9 @@ class FormTest extends TestCase
      */
     public function testExecuteInvalid()
     {
-        $form = $this->getMock('Cake\Form\Form', ['_execute']);
+        $form = $this->getMockBuilder('Cake\Form\Form')
+            ->setMethods(['_execute'])
+            ->getMock();
         $form->validator()
             ->add('email', 'format', ['rule' => 'email']);
         $data = [
@@ -141,7 +143,9 @@ class FormTest extends TestCase
      */
     public function testExecuteValid()
     {
-        $form = $this->getMock('Cake\Form\Form', ['_execute']);
+        $form = $this->getMockBuilder('Cake\Form\Form')
+            ->setMethods(['_execute'])
+            ->getMock();
         $form->validator()
             ->add('email', 'format', ['rule' => 'email']);
         $data = [