Re: Mysqli support - test or complain? [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 12, 2007 4:47 AM, Per Jessen <per@xxxxxxxxxxxx> wrote:

> Robert Cummings wrote:
>
> >> I can't remember what sort of environment the OP was in, but if any
> >> sort of organised testing is done, the use of two different APIs will
> >> just about double the test-effort.  Which is why I still think the
> >> best option is to mandate _one_ of the APIs and choose your hoster
> >> accordingly.
> >
> > Well if you write unit tests, having the unit tests applied to one or
> > the other is the same amount of work since it just requires a switch
> > to change between mysql and mysqli.
>
> Regardless of how you do it, it's twice the amount of work to run a test
> twice.
>

actually its really not a big deal to actually run a test a couple of times.
supporting multiple libraries will add flexibility, but always with
flexibility there
is the cost of additional complexity (this can take many forms).
in regard to unit tests, the extra effort would be spent actually writing
both
unit tests.  however, once the first one is written the second one should be
pretty easy, especially if they are both coded against an abstract database
interface.  it could even make sense to write one test against an abstract
class
then create concrete subclasses for each specific library.  then in the
future
adding a test for, say postgre, would be trivial.

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux