Hi everyone ! Some days ago, i created the following ticket http://trac.symfony-project.org/ticket/7084.
The proposal was to create an interface for lime_test, in order to let the user implements is one one (using phpunit for example). But Fabien replied me that it was not really clever because i would have to implements all the lime_method Well that what i did but with a not really clean fix : 1) Because sfBrowser is lime specific i created a child class that overrides all the lime method with phpunit's equivalents ------------------------------------------------------------------------------------------------ class myBridgeToPHPUnit extends lime_test ... ------------------------------------------------------------------------------------------------ 2) Then I pass the instance of this object to the sfFunctionalTest. ------------------------------------------------------------------------------------------------ $this->oBrowser = sfFunctionalTest(new sfBrowser(), $bridge, $testers); ------------------------------------------------------------------------------------------------ 3) The issue is that without interface, i must extends lime_test, to be able to do that... ------------------------------------------------------------------------------------------------ public function __construct(sfBrowserBase $browser, *lime_test* $lime = null, ... ------------------------------------------------------------------------------------------------ I created a child class of lime test that redefine every methods with the phpunit equivalent. 4) Now i have a nice object oriented phpunit test case that looks like this (where $browser is a sfFunctionalTest instance configured with my child class that delegates test to phpunit): ------------------------------------------------------------------------------------------------ class frontendAccountLogin extends myFunctionalTestCase { public function testLoginNominal($browser) { ... $browser->with('form')->begin()-> hasErrors(false)-> end()-> } } ------------------------------------------------------------------------------------------------ Maybe this not the way to do it... If anyone has an idea of how to achieve this goal (4) i'am very interested ! -- David Stendardi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---