Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35094 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38073 invoked by uid 1010); 2 Feb 2008 10:37:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 38058 invoked from network); 2 Feb 2008 10:37:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2008 10:37:48 -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 64.233.182.185 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: 64.233.182.185 nf-out-0910.google.com Received: from [64.233.182.185] ([64.233.182.185:25677] helo=nf-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5C/B0-29702-BF744A74 for ; Sat, 02 Feb 2008 05:37:48 -0500 Received: by nf-out-0910.google.com with SMTP id e27so273937nfd.13 for ; Sat, 02 Feb 2008 02:37:45 -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:subject:content-type:content-transfer-encoding; bh=TdDmrNSfwaT6aqXxEQ9GnO9yQN+zfmS2P4Um2d7J130=; b=lP1mxKfAB8e1Erwg9ks6QluGA2Ss4oYYOGep00ZdjKix/XbBrwpNbPrrm0aHj8c+BXHVcV/J8utVUgwImc3tvxIsHBero0ADXFrAayw5Bzih4J9AeEzJyiVvSQrAONk+EQTtvCapVWWl4TDYce4T+XZ922Yq8VPYeoBngF3NbEU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=EhuGF2QsNcRmuFttKbDgN04BVMm8crCMiT8XbZALowysKIoI6edUASmGVukMROHJqWbUvQiFAWZCR+w+/wTV7nJsssXISpoQYEBB9gcJlHFpzAgeSMfjEBw9jccfLmD2YvygtvwugJEJJ/QDWzX+lrVzMWh8XIDolBHijYL0Bdc= Received: by 10.78.179.12 with SMTP id b12mr8031903huf.34.1201948664717; Sat, 02 Feb 2008 02:37:44 -0800 (PST) Received: from ?192.168.1.106? ( [81.146.13.254]) by mx.google.com with ESMTPS id f6sm5157168nfh.21.2008.02.02.02.37.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 02 Feb 2008 02:37:43 -0800 (PST) Message-ID: <47A447F0.8040605@googlemail.com> Date: Sat, 02 Feb 2008 10:37:36 +0000 User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Writing PHPT tests From: zoe.slattery@googlemail.com (zoe) 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.