Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28369 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34109 invoked by uid 1010); 16 Mar 2007 14:26:58 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34094 invoked from network); 16 Mar 2007 14:26:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2007 14:26:58 -0000 Authentication-Results: pb1.pair.com header.from=zoe.slattery@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=zoe.slattery@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 64.233.182.184 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.184 nf-out-0910.google.com Linux 2.4/2.6 Received: from [64.233.182.184] ([64.233.182.184:39438] helo=nf-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/E6-46796-139AAF54 for ; Fri, 16 Mar 2007 09:26:57 -0500 Received: by nf-out-0910.google.com with SMTP id l35so294652nfa for ; Fri, 16 Mar 2007 07:26:54 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=oiGqkjxDFgo1tInxflDY5Uja7jlWxrE9IKiGUQk8wQrOmY0LGBawQ6t8QXxgFTO/oC+qCVjMA6O7+eU9mtLThmOen9D+78E8VOexfXeBmvAtTfn/E3qBv7lepQHZtPvZ22KIxIOC2RmMdoD/y0hqPX0mu6mddZFuWok9ojazPeA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=KKarIfJBiHKivqKJIenopuyvasHqp5796hzj17bnUpVtWaaxvv3Ursg8Od0v7dciGU1jpC1OZn8+zG9Aax2cw7bCSDpIeU30jtauZWd9cBTAWVYynJFTAmBCz2aJxBhwRJDatH3m6I03pSRpXc1U3cPGGLYIlPm+A7aDzNTGy+c= Received: by 10.78.185.16 with SMTP id i16mr1004057huf.1174055214542; Fri, 16 Mar 2007 07:26:54 -0700 (PDT) Received: from ?192.168.1.104? ( [81.146.27.153]) by mx.google.com with ESMTP id g1sm4526712nfe.2007.03.16.07.26.50; Fri, 16 Mar 2007 07:26:53 -0700 (PDT) Message-ID: <45FAA90C.7070006@googlemail.com> Date: Fri, 16 Mar 2007 14:26:20 +0000 User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: internals@lists.php.net References: <45F8173F.3010902@googlemail.com> <622207866.20070314203432@marcus-boerger.de> In-Reply-To: <622207866.20070314203432@marcus-boerger.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] php.ini and PHPT From: zoe.slattery@googlemail.com (Zoe Slattery) Hi Marcus Thanks - that answers the question ...and test cases are on their way:-) I have just committed 3 tests in the PHP 6 stream (strcasecmp, strcmp, strlen) and would very much appreciate any feedback on them. We are aiming for both line coverage and functional coverage, it would be good to know if we are missing obvious things. For the future I think we will probably split out the test cases into good-path tests and error-path tests, putting both into one test case has resulted in the test cases being quite big. I have one specific question though, I notice that the string that follows Warning: is changing in PHP6, for example in PHP5 one would expect: Warning: Wrong parameter count for strcasecmp() in blah.php on line 3 In PHP6: Warning: strcasecmp() expects exactly 2 parameters, 0 given in blah.php on line 3 The PHP6 message is clearly an improvement and the test cases that I have just put in PHP6 check the Warning: like this: --EXPECTF-- Warning: strcasecmp() expects exactly 2 parameters, 0 given in %s on line %d But of course, this will only pass on PHP6. We can deal with this in two ways: (a) Use "Warning: %s" in the EXPECTF section. This will pass test on PHP5 and PHP6 but it won't check that PHP is giving the right error mesage - ie "exactly 2 parameters" as opposed to "exactly 42 parameters" (b) We can have different test cases for PHP5 and PHP6. I don't particularly like either of these, but have a slight preference for (b) because it's a more satisfactory test of the implementation. What's your view? Or anyone else's? Marcus Boerger wrote: > Hello Zoe, > > we decided to go the --INI-- route to test as many configurations as > possible. And only for specific tests change specific ini settings as > necessary. If one usees phpt as a test framework for his on web stuff > then it might be a good idea to do as you suggested. You would simply > do "php run-tests.php -c ". Hope this satisfies you :-) > > best regards > marcus > > p.s.: Looking forward for new tests from your side > > Wednesday, March 14, 2007, 4:39:43 PM, you wrote: > > >> Hi - I wonder if anyone could help me with a testing question? >> > > >> We have written a few additional test cases for string functions which I >> was about to check-in, then I noticed that the test cases pass OK if I >> use the php.ini-dist file and fail if I don't specify an file (ie use >> all default settings). >> > > >> The difference turns out to the be the use of precision =12 in the >> php.ini-dist, rather than the the default value of 14. >> > > >> It's easy enough to work around this and ensure that test cases pass in >> both environments with an --INI-- section in the test case, however - I >> wondered if there would be any value in having a php-ini file that was >> explicitly used for tests? >> > > >> We had been using the php.ini-dist file because it's slightly easier to >> be precise about the test environment if you can say what you are using >> rather than saying "I'm using the default values". I also find it rather >> too easy to get the wrong php.ini file accidentally :-( so specifying >> one is easier, even if it only contains default values. >> > > >> Zoe >> IBM >> > > > > > Best regards, > Marcus > > >