diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index 6e64d7ffe..bb10756ed 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -2149,10 +2149,14 @@ class DboSourceTest extends CakeTestCase { $this->db->query('SELECT 1'); $this->db->query('SELECT 1'); $this->db->query('SELECT 2'); - $this->assertAttributeCount(2, '_queryCache', $this->db); + + $property = new ReflectionProperty($this->db, '_queryCache'); + $property->setAccessible(true); + + $this->assertCount(2, $property->getValue($this->db)); $this->db->flushQueryCache(); - $this->assertAttributeCount(0, '_queryCache', $this->db); + $this->assertCount(0, $property->getValue($this->db)); } /** diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 2392be425..046919ebc 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -8765,11 +8765,15 @@ class FormHelperTest extends CakeTestCase { $this->assertEquals(array('Post.title'), $this->Form->fields); $this->assertStringContainsString($hash, $result, 'Should contain the correct hash.'); - $this->assertAttributeEquals( + + $property = new ReflectionProperty($this->Form, '_lastAction'); + $property->setAccessible(true); + + $this->assertSame( '/basedir/posts/add', - '_lastAction', - $this->Form, - 'lastAction was should be restored.'); + $property->getValue($this->Form), + 'lastAction was should be restored.' + ); } /** @@ -11188,7 +11192,10 @@ class FormHelperTest extends CakeTestCase { $this->Form->request->here = $here; $this->Form->create('User'); - $this->assertAttributeEquals($here, '_lastAction', $this->Form, "_lastAction shouldn't be empty."); + $property = new ReflectionProperty($this->Form, '_lastAction'); + $property->setAccessible(true); + + $this->assertSame($here, $property->getValue($this->Form), "_lastAction shouldn't be empty."); } /** @@ -11204,7 +11211,10 @@ class FormHelperTest extends CakeTestCase { $this->Form->request->here = $here; $this->Form->create('User'); - $this->assertAttributeEquals($here, '_lastAction', $this->Form, "_lastAction shouldn't be empty."); + $property = new ReflectionProperty($this->Form, '_lastAction'); + $property->setAccessible(true); + + $this->assertSame($here, $property->getValue($this->Form), "_lastAction shouldn't be empty."); } /**