Browse Source

Merge pull request #9489 from davidyell/patch-2

Add a clear of the TableRegistry to tearDown
José Lorenzo Rodríguez 9 years ago
parent
commit
56134c3029
2 changed files with 3 additions and 0 deletions
  1. 1 0
      src/TestSuite/TestCase.php
  2. 2 0
      tests/TestCase/View/Form/EntityContextTest.php

+ 1 - 0
src/TestSuite/TestCase.php

@@ -120,6 +120,7 @@ abstract class TestCase extends PHPUnit_Framework_TestCase
             Configure::clear();
             Configure::write($this->_configure);
         }
+        TableRegistry::clear();
     }
 
     /**

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

@@ -631,6 +631,8 @@ class EntityContextTest extends TestCase
      */
     public function testValAssociatedCustomIds()
     {
+        $this->_setupTables();
+
         $row = new Article([
             'title' => 'First post',
             'user' => new Entity([