Re: PHP Unit tests

[email protected] (Keith Roberts) Sat, 23 Jun 2007 19:47:23 +0100 (BST)
Newsgroups php.evangelism
Message-ID <[email protected]>
On Fri, 22 Jun 2007, Bojan Tesanovic wrote:

> To: [email protected]
> From: Bojan Tesanovic <[email protected]>
> Subject: PHP Unit tests
> 
> Hi there,
>
> I am Web developer and front-end team lead of classifieds search engine 
> site.
> We are using php 5.2.0 and Zend Framework to power our web site.
> But lately my manager wants to jump to another platform RnR or Java
> which I dislike though he is right in some points.
>
> 1. Lack of strong types which can cause lot of headaches

What about using a standard naming convention such as:

$s_varname for a string variable

$b_varname for a boolean variable

$i_varname for an integer variable

etc. etc.

You could put your heads together and come up with a naming 
scheme that everyone likes and agrees on.

> 2. Missing of PHP Unit framework that is supported by Zend or PHP 
> community

Here is a good book on Unit testing I hope to get my hands 
on soon, that you might like. PHPUnit is a port of JUnit to 
PHP - so this book should do nicely. OO PHP & Java syntax 
are very similar.

http://www.pragmaticprogrammer.com/starter_kit/utj/index.html

> 3. Robust UTF-8 and I18N support which will I hope be nailed in PHP6

> 4. Maybe a way to compress source or make opcode of php files in one file 
> and deploy it to web server

Ioncube PHP Encoder - not free but may be the best of 
choice. You can download the trial version and check it out 
for free.

http://www.ioncube.com/comments.php

Regards

Keith

------------------------------------------------------------
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

This email address is challenge-response protected with
http://www.tmda.net
------------------------------------------------------------