mock driver
| From: | Lukas Smith | Date: | Wed, 14 May 2003 12:53:18 +0000 |
| Subject: | mock driver | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16237@lists.php.net to get a copy of this message | ||
> From: Davey [mailto:davey@php.net]
> Sent: Wednesday, May 14, 2003 2:28 PM
> > We could provide a mock-driver for DB and MDB, ie:
> > $db=DB::connect("mock://path/to/mock.xml");
> >
> > mock.xml is test specific and clould looks like this:
> > <mock>
> > <query>
> > <sql>SELECT a,b FROM myTable where a='Alice'</sql
> > <result>
> > <row>
> > <col name="a">Alice</col>
> > <col name="b">Bob</col>
> > </row>
> > </result>
> > </query>
> > </mock>
> >
> > The mock driver just looks for the given SQL-Statement and returns
the
> > result defined in the file.
> >
> > This should solves the most problems with DB-related packages.
> >
>
there is a flat file db with an sql interface for php ..
if we write a driver for it then we would be all set.
Regards,
Lukas