RE: [PEAR] [MDB] about test case framework
| From: | Lukas Smith | Date: | Fri, 21 Nov 2003 16:00:53 +0000 |
| Subject: | RE: [PEAR] [MDB] about test case framework | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9082@lists.php.net to get a copy of this message | ||
> From: Thierry Bothorel [mailto:thierry.bo@netcourrier.com]
> Sent: Friday, November 21, 2003 4:57 PM
> sorry for my questions, I try to understand how the tests/drivers works.
> At
> the begining of driver contructor I have (from mssql.php) :
>
> function MDB_mssql()
> {
> $this->MDB_Common();
> $this->phptype = 'mssql';
> $this->dbsyntax = 'mssql';
>
> $this->supported['Sequences'] = 1;
> $this->supported['Indexes'] = 1;
> $this->supported['AffectedRows'] = 1;
> $this->supported['Summaryfunctions'] = 1;
> $this->supported['OrderByText'] = 0;
> $this->supported['CurrId'] = 1;
> $this->supported['SelectRowRanges'] = 0;
> $this->supported['LOBs'] = 1;
> $this->supported['Replace'] = 0;
> $this->supported['SubSelects'] = 1;
>
> What means supported here: Supported by the driver, or supported by the
> database. I mean a database can support a feature, but the driver does not
> implement it ?
>
> From the test cases, I got for example :
>
> mdb_usage_testcase : Starting testtransactions ...
> Failure 1 : This database does not support Transactions expected true,
> actual false
> There were 1 failures for testtransactions
> There were 0 errors for testtransactions
>
> I understand it is normal that the test case print "This database does not
> support Transactions", since this property is not even defined. But I
> don't
> undestand "expected true". How the test know that it should be true?
>
> Also, what is the complete preperty list that should be defined in each
> driver? Here I think Transactions should be defined since mssql support
> them.
This array is used by the user to determine if the feature is available.
This can either mean this is a natively supported feature or it is emulated.
However the driver test suite expects all tests to succeed, because the goal
of MDB is to allow database independent development.
Regards,
Lukas