From 17ffcde5057d9c54143423a2caa8e3a24029d296 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 12 Nov 2011 21:00:42 -0500 Subject: [PATCH] Update test. Add fixtures so app tables aren't touched. Replace construction with method calls. --- lib/Cake/Test/Case/View/ViewTest.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Test/Case/View/ViewTest.php b/lib/Cake/Test/Case/View/ViewTest.php index 1d612e77d..2f5ce2fbd 100644 --- a/lib/Cake/Test/Case/View/ViewTest.php +++ b/lib/Cake/Test/Case/View/ViewTest.php @@ -170,6 +170,13 @@ class TestAfterHelper extends Helper { */ class ViewTest extends CakeTestCase { +/** + * Fixtures used in this test. + * + * @var array + */ + public $fixtures = array('core.user', 'core.post'); + /** * setUp method * @@ -576,14 +583,14 @@ class ViewTest extends CakeTestCase { $View->Helpers = $this->getMock('HelperCollection', array('trigger'), array($View)); $View->Helpers->expects($this->at(0))->method('trigger') - ->with('beforeRender', new PHPUnit_Framework_Constraint_IsAnything()); + ->with('beforeRender', $this->anything()); $View->Helpers->expects($this->at(1))->method('trigger') - ->with('afterRender', new PHPUnit_Framework_Constraint_IsAnything()); + ->with('afterRender', $this->anything()); $View->Helpers->expects($this->at(2))->method('trigger') - ->with('beforeLayout', new PHPUnit_Framework_Constraint_IsAnything()); + ->with('beforeLayout', $this->anything()); $View->Helpers->expects($this->at(3))->method('trigger') - ->with('afterLayout', new PHPUnit_Framework_Constraint_IsAnything()); + ->with('afterLayout', $this->anything()); $View->render('index'); }