473,789 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1786
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...@kra tz.maardanzonde rditstuk.nlwrot e:
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.ph p
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
4620
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 cool language. I've done Perl and like it, there are a few features of PHP I like but overall am not too excited about it. I have found PHP's strtotime() function to be quite flexible and handy and we make liberal use of it. I have not yet really...
3
2212
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. I've created the following trivial piece of testcode and put it in TrueTest.php. When I try to run 'phpunit TrueTest' nothing happens, the same with 'phpunit TrueTest.php' and 'phpunit TrueTest TrueTest.php'. If I run phpunit without arguments I...
4
1775
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) http://pear.php.net/package/PHPUnit2/ I am confused. Can anybody help me out and tell me what is happening
0
1116
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 at http://www.phpunit.de/en/phpunit2_codecoverage.php and
4
2950
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 where I'm coming from.) (Additionally, this may or may not fit in this group, but I know there's bright people here, and it is largely PHP development centric) Any time I've done web development, I've always been plagued by some of the...
1
7842
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 included everything in case there is something there that's helpful. I'm trying to install PEAR so that I can use PHPUnit. Thanks for the help!!!!
6
2709
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
1771
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 PHPUnit_Framework_TestCase {
2
6360
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 silly error that PDO could not find a driver for my postgresql db. that is it PDOEXception could not find driver and nothing else. I made a test and everything works fine when I am connecting from simple php file to pgsql. there is no problem with...
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10136
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6765
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4090
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.