Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35128 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28700 invoked by uid 1010); 3 Feb 2008 09:27:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 28685 invoked from network); 3 Feb 2008 09:27:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2008 09:27:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=zoe.slattery@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=zoe.slattery@googlemail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 72.14.220.157 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: zoe.slattery@googlemail.com X-Host-Fingerprint: 72.14.220.157 fg-out-1718.google.com Received: from [72.14.220.157] ([72.14.220.157:50609] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/63-01807-DF885A74 for ; Sun, 03 Feb 2008 04:27:26 -0500 Received: by fg-out-1718.google.com with SMTP id 22so1676319fge.23 for ; Sun, 03 Feb 2008 01:27:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=2mGAOfHDKY87M+vb6I/09gUEMtYkxMsPTJVbneGn1To=; b=C+Lk7Zw8TMZ1VQFWttsLUbGHLr7CbOrF5r4026ppo+MUrnZbwtiok/1OM5aAawby35wn+WkZA65Txqqx9FlPUnp466JnRsuKp8KAh98+rpDJLrcOhqvV4ocqPWYhhWrElTeM1FSz7Z6c3vihn7Ag6liezKTa5QNPHrudkOSUx1w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=ivLHnCjgzXDvFGMethXnxiBicjRUTd+RRprxxomjE6b7NdJzQi+N/mk//OrMXvfP3BL6u849a1Yf99qCxMC/U8hlwoLncopXU7DL2LrcQUXMhcOZsehCXDFb5BvvtiOej9wWb4VDpIpZvUugazwW2MvgkPgvExEYvpxCcuK9IFQ= Received: by 10.78.138.6 with SMTP id l6mr9794859hud.32.1202030842358; Sun, 03 Feb 2008 01:27:22 -0800 (PST) Received: from ?192.168.1.106? ( [81.146.13.254]) by mx.google.com with ESMTPS id i4sm4040509nfh.37.2008.02.03.01.27.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 03 Feb 2008 01:27:21 -0800 (PST) Message-ID: <47A588FF.4020707@googlemail.com> Date: Sun, 03 Feb 2008 09:27:27 +0000 User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: Rob Nicholson CC: internals@lists.php.net References: <47A447F0.8040605@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Writing PHPT tests From: zoe.slattery@googlemail.com (zoe) Rob Nicholson wrote: > > Hi Zoe, > > I notice also that the testcase generator and the testcases we have > been committing differ slightly from the conventions listed at: > http://qa.php.net/write-test.php . This was based on feedback we > received so I think that http://qa.php.net/write-test.php should be > updated. Specifically the convention of writing multiple small tests > to cover basic, variation and error cases separately differs from the > naming convention suggested on the QA pages. Rob - you are right - I think the most important thing we learned is that size matters - the smaller the better. > We have also been following a convention w.r.t comments in the > testcase which I think is helpful so I'd suggest we cover this too. > Since the testcase generator adds these comments its worth > documenting them. > > I'll produce a patch to the documentation for review if you like. > Please do :-) I admit I have been meaning to do this for ages and it's bad that I haven't got around to it. > > Rob Nicholson > > > From: zoe > To: internals@lists.php.net > Date: 02/02/2008 11:21 > Subject: [PHP-DEV] Writing PHPT tests > > > ------------------------------------------------------------------------ > > > > Hi - for any of you that are writing PHPT tests for existing extensions > - I put a PHP script called generate_phpt.php into PHP 5.3 yesterday > which might help a little. > > It's quite a simple command line script (Raghu and I wrote it last > year), it works by looking at the {{{proto line for a function in PHP > source code and construct a test case frame from it. It can be used to > construct very simple tests cases - or to turn an existing PHP file into > PHPT format. It doesn't try and guess what the results of a test should > be :-). I will document it properly on qa.php.net later. In the meantime: > > php generate_phpt.php --help > > tells you what it's supposed to do. > > Zoe > > PS - It doesn't work for PHP6 right now because the {{{proto line is > different. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > ------------------------------------------------------------------------ > > / > / > > /Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with > number 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 > 3AU/ > > > > > >