For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > January 2008 > Re: [PEAR-QA] Naming conventions in phpt









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR-QA] Naming conventions in phpt
Helgi Þormar Þorbjörnsson

2008-01-25, 7:09 pm

Hi

On Jan 25, 2008 12:31 PM, till <klimpong@gmail.com> wrote:

> Hey,
>
> I am just getting around to phpt and I wanted to ask what the naming
> conventions are in OO.
>
> I read online (1, btw - very straight forward guide) that
> bug_<no>.phpt, method.phpt etc. are acceptable. But I am wondering how
> it conforms with OO - e.g. classname.method.phpt?
>
> On a sidenote - a small section ("How to write tests") referencing the
> phpt URL and maybe a phpUnit HOWTO would be nice in the PEAR manual as
> well.
> Can anyone contribute this? :) If so I write something up.
>
> Thanks,
> Till
>
> 1, http://qa.php.net/write-test.php



We don't have any specific standard, php qa says bug_21343 for some reason I
tend to do bug323424, and well people sometimes do classname/method.phpt
where the classname is a dir and sometimes classname/method/foobar.phpt when
people need multiple tests per method or do method1 method2 method3.phpt in
the classname dir

There so many different ways I've seen people do it, do we really need or
want a standard on this ?

Regards
Helgi

Ken Guest

2008-01-25, 7:09 pm

On Fri, Jan 25, 2008 at 06:30:21PM +0000, Helgi Þormar Þorbjörnsson wrote:
> Hi
>
> On Jan 25, 2008 12:31 PM, till <klimpong@gmail.com> wrote:
>
<snip> [color=darkred]
> We don't have any specific standard, php qa says bug_21343 for some reason I
> tend to do bug323424, and well people sometimes do classname/method.phpt
> where the classname is a dir and sometimes classname/method/foobar.phpt when
> people need multiple tests per method or do method1 method2 method3.phpt in
> the classname dir
>
> There so many different ways I've seen people do it, do we really need or
> want a standard on this ?
>


why would we not want a standard?
surely it's better to have a standard than to be disorganised?

other developers, and I'm sure people new to coding for PEAR, may find
it useful knowing how to find, and where to place, specific tests for
the components/packages they are working on.


k.

--
Ken Guest
Mobile: +353 86 8252 141 http://blogs.linux.ie/kenguest/
Irish PHP Users Group http://www.php.ie

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com