hi folks,
New test suite is very good, conguralations for that, bu i think some
piece is missing, sfTesterPropel.class

i think it's very good for functional test, if you set some values for
model classes in your action we can't control in functional test,

an examples:

// $c is Confirmation model for retrieve confirmation key from db;

$browser->
   get('/confirm/'.$c->getConfirmationKey())->
   with('request')->begin()->
    isParameter('module', 'user')->
    isParameter('action', 'confirm')->
   end()->
   with('user')->begin()->
     isAuthneticated()->
   end()->
   info('check model for functional test')->
   with('propel')->begin()->
     setModelName('confirmation')->
     setMethodName('retrieveByConfirmationKey',
array($c->getConfirmationKey()))->
     checkExists()->
     checkValue('isEnabled', false)->
   end()->
   with('response')->begin()->
     isStausCode(302)->
  end();


in confirm action:

function executeConfirm($request)
{
    $confirm = ConfirmationPeer::retrieveByKey($request->getParameter('key'));
    if(!$confirm)
    {
      return sfView::ERROR;
    }

    $this->getUser()->setLogin($confirm->getUser());
    $confirm->setIsEnabled(false); // we check in sfTester that value
    $confirm->save(); // maybe we forget execute save method in
action, we check in sfTester

    $this->redirect('@homepage');
}




-- 
Saygılar && İyi Çalışmalar
Timu EREN ( a.k.a selam )

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" 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/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to