Hey I'm wanting to use Selenium to do some functional testing and want
to use a separate database its own test data (essentially using this
database as a group of fixtures)

I wanting use my urls like : /:controller/:action/:id/selenium

idea being that when /selenium is present then my app => $useDbConfig
= 'selenium', otherwise just use 'default'

currently i can get it to work with an exceptionally ugly hack from
within my parent model (all my other models extend this one)

                class TestableAppModel extends AppModel {

                        function TestableAppModel() {
                                if 
(preg_match('/\/selenium$/',$_SERVER['REQUEST_URI'])) {
                                        $this->useDbConfig = 'selenium';
                                }
                                $this->AppModel();
                        }


Anyone know of a nicer way to do this?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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