473,395 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

PHPUnit 3

Hi *,

I searched for best practises for php apps, especially if you're using
phpunit as testframework.

I found nothing interesting, so I ask you, what do you think is a best
practise on directory hierarchy.
I'm actually using

/
config/ - contains config-files and is unreadable from internet ;)
classes/ - where my ownclasses/libraries are
doc/
lib/ - foreign libs, e.g., smarty if not installed on host
templates/ - smarty template dir..
tests/ - phpunit tests

I also read http://framework.zend.com/wiki/displ...rectory+Layout
but it says nothing about tests. Maybe the guys from Zeev and Andi do
not test :)

Cheers,
tuergeist

May 21 '07 #1
2 1763
I searched for best practises for php apps, especially if you're using
phpunit as testframework.

I found nothing interesting, so I ask you, what do you think is a best
practise on directory hierarchy.
I usually have some kind of administrator directory with a password on
it. My unit tests can be run from there. Off course, the tests
themselves are outside of the web root, as they do not contain any file
that should be called directly. There is one exception (which can be
found in subdirectories of admin): I sometimes add documentation to my
tests in the form of an UML scheme.

For a demo, see http://www.w-p.dds.nl/storyboard/admin/rununittests.php

Best regards,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
May 21 '07 #2
On 21 Mai, 14:26, Willem Bogaerts
<w.bogae...@kratz.maardanzonderditstuk.nlwrote:
I searched for best practises for php apps, especially if you're using
phpunit as testframework.
I found nothing interesting, so I ask you, what do you think is a best
practise on directory hierarchy.

I usually have some kind of administrator directory with a password on
it. My unit tests can be run from there. Off course, the tests
themselves are outside of the web root, as they do not contain any file
that should be called directly. There is one exception (which can be
found in subdirectories of admin): I sometimes add documentation to my
tests in the form of an UML scheme.

For a demo, seehttp://www.w-p.dds.nl/storyboard/admin/rununittests.php
Ok.
Thank you. It seems that nobody else tests its software.

Cheers
Christoph

May 24 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
by: Erik Johnson | last post by:
This is somewhat a NEWBIE question... My company maintains a small RDBS driven website. We currently generate HTML using PHP. I've hacked a bit in Python, and generally think it is a rather...
3
by: Jacob Atzen | last post by:
Howdy, For the last couple of days I've been trying to get PHPUnit2 (the one from Pear) working on my system. I have read the documentation over and over but still can't get any tests to run....
4
by: mirnazim | last post by:
Hi, I was googling for a unit testing framework for php. I stumbled upon 3, all are named PHPUnit. 1) http://phpunit.sourceforge.net/ 2) http://pear.php.net/package/PHPUnit/ 3)...
0
by: mirnazim | last post by:
hi, how do I use code coverage and test skeleton generators to work in PHPUnit2. I used following commands 1) phpunit --coverage-html SomeTest 2) phpunit --skeleton SomeClass as described...
4
by: Richard Levasseur | last post by:
(Forewarning, most of these problems and solutions come from being the only developer in a 1 server department with no budget, few resources, unresponsive IT, and non-technical managers, so thats...
1
by: CSTechie | last post by:
I've been battling to install PEAR on Windows XP now for too long. I am not sure what I need to do. When I run go-pear.php from the command line, I get the error message as shown at the end. I...
6
gauravgmbhr
by: gauravgmbhr | last post by:
CAN some one tell me any link or web site from where i can download PHPUnit with its corresponding manual
0
by: dhillarun | last post by:
Hi All, I have written some PHPUnit test code by using classes. test.php <?php require_once('PHPUnit/Framework.php'); include("hello.php"); class Test1 extends ...
2
by: kamiseq | last post by:
i have phpunit installed as on the site(http://www.phpunit.de/ pocket_guide/3.2/en/installation.html). im running simple tests (that actually have been running on sqlite base) and I got that...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.