Hello everybody,

what I'm trying to achieve is to insert a testunit of the
authentication procedure already implemented and running.

So I would not like to change the code.

The procedure access a MembersController::signin() that if has
$this->data set then do all the required operation for testing the
UID/PASS correctness and the set the suitable session paramters.

These session parameters are tested within all the application for
signed user test and used with ACL for giving the right permissions.

What I though was to do a
MembersControllerTestCase::testAuthentication() (for example) and
inside this call something like

   $this->object->Session->destroy();

   $this->object->requestAction("/members/signin");

   $this->assertFalse($this->object->Session->check(PARAM));

   $data = array();
   $data["Member"]....
   $this->object->data = $data;

   //this should execute the authentication procedure
   $this->object->requestAction("/members/signin");

   $this->assertTrue($this->object->Session->check(PARAM));

obviously this is not working or I wouldn't have been here asking :)

I'm browsing a bit api and google. Does someone has an idea on how
reach the goal?

I've also tried setting a local SessionComponent with

   loadComponent("Session");
   $this->Session = new SessionComponent();

but it seems that the session I'm using in the testsuite is not the
same of the one used in the requestAction or something else.

Thanks a lot
Davide

-- 
Live life like you're gonna die. Because you're gonna.
                                            William Shatner


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to