Re: PHPUnit tests that access a remote server
| From: | Jorrit Schippers | Date: | Wed, 21 Nov 2007 20:14:10 +0000 |
| Subject: | Re: PHPUnit tests that access a remote server | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48565@lists.php.net to get a copy of this message | ||
""Helgi Þormar Þorbjörnsson"" <helgith@gmail.com> schreef in bericht
news:12b792160711211151j775c450egd7f56a6ac5a80ac4@mail.gmail.com...
> Requiring an external resource is not uncommon, you need an ftp server to
> test this package, that's legit, MDB2 needs a database, etc :)
>
> Do what Christian said and everyone will be happy, you can even do
> something
> similar to MDB2, kinda like a status file where you list couple of FTP
> servers you test with or you ask some other people to test and so you can
> have a list of common ftp servers and what works with them.
>
> A crude example:
>
> Read | Write | Upload
> FTP server v1 X X X
> FTP server v2 X X
>
> and so on, look at the mdb2 CVS docs dir for a proper example :P
>
I don't think that last part is really useful: MDB2 is a layer over multiple
incompatible SQL implementations, while Net_FTP is an OO layer on top of the
ftp extension, using the ftp standard. When something doesn't work on
certain FTP servers, that's usually the fault of that server. Maintaining a
list of compatibilities is not within the scope of this package, and
certainly not feasible. Perhaps when an own implementation of the FTP
protocol is added as an option for servers that do not have the ftp
extension enabled this can be useful.
Jorrit