Actually there's no need to instantiate Object in execute(), change it to:
function _execute($controller, $action = null, $params = array(),
$requested = true) {
$url = Inflector::underscore($controller) .
ife(!empty($action), '/' . $action, '') . ife(is_array($params) &&
!empty($params), '/' . join('/', $params), '');
$attributes = array();
if (!$requested) {
$attributes['return'] = true;
}
return @Object::requestAction($url, $attributes);
}
-MI
---------------------------------------------------------------------------
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
blog: http://www.MarianoIglesias.com.ar
-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de Mariano Iglesias
Enviado el: Lunes, 16 de Abril de 2007 06:03 p.m.
Para: [email protected]
Asunto: RE: Call to a member function read() on a non-object in when TEST
I need to build an article on Bakery on how to test controllers, but use
this as a guide for now (tell me later how it went.)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---