Jun 8, 2009 0
How can i check the count of database queries in my unit test?
1 2 3 | $manager = new sfDatabaseManager($configuration); $connection = $manager->getDatabase('doctrine')->getDoctrineConnection(); $connection->count(); |
Jun 8, 2009 0
1 2 3 | $manager = new sfDatabaseManager($configuration); $connection = $manager->getDatabase('doctrine')->getDoctrineConnection(); $connection->count(); |
Mar 15, 2009 0
Use this in your testcode to create the user object
1 2 3 4 5 6 7 8 | $_SERVER['session_id'] = 'test'; $dispatcher = new sfEventDispatcher(); $sessionPath = sfToolkit::getTmpDir().'/sessions_'.rand(11111, 99999); $storage = new sfSessionTestStorage(array('session_path' => $sessionPath)); $myUser = new myUser($dispatcher, $storage); $myUser->setAttribute('user_id', 1, 'sfGuardSecurityUser'); |
Recent Comments