Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47192 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80514 invoked from network); 12 Mar 2010 21:55:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2010 21:55:17 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.117 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.117 us-mr1.zend.com Received: from [63.205.162.117] ([63.205.162.117:44582] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/05-13686-448BA9B4 for ; Fri, 12 Mar 2010 16:55:17 -0500 Received: from us-gw1.zend.com (us-ex1.zend.net [192.168.16.5]) by us-mr1.zend.com (Postfix) with ESMTP id 37DA143FD1; Fri, 12 Mar 2010 13:56:41 -0800 (PST) Received: from [192.168.16.93] ([192.168.16.93]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 12 Mar 2010 13:55:13 -0800 Message-ID: <4B9AB840.1010209@zend.com> Date: Fri, 12 Mar 2010 13:55:12 -0800 Organization: Zend Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Alexey Zakhlestin CC: Pierre Joye , jani.taskinen@iki.fi, internals@lists.php.net References: <4B9926E8.4080202@lerdorf.com> <4B995F83.1000605@prohost.org> <4B99639B.9030405@oracle.com> <4B996FC6.7040102@zend.com> <4B997381.1050300@oracle.com> <4B9A14FF.6000703@iki.fi> <4B9A833A.8040402@zend.com> <4B9A848C.3080701@iki.fi> <4B9A93EE.7080403@zend.com> <1418253B-84A3-4CA6-965B-A2501A5D432F@gmail.com> In-Reply-To: <1418253B-84A3-4CA6-965B-A2501A5D432F@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Mar 2010 21:55:13.0921 (UTC) FILETIME=[B1B53F10:01CAC22E] Subject: Re: [PHP-DEV] Tests repository From: stas@zend.com (Stanislav Malyshev) Hi! >> That's easy to say - but how exactly you're going to test >> functionality of, say. ext/intl without testing the underlying ICU >> library? > > Well, here's the way I see it: > > Extensions (including ext/intl) declare their API and tests are made > againt this API. No more and no less. It's all sounds very nice in theory, except that in practice it doesn't work this way. Different versions of the library return different data, different errors, have different conditions, etc. You can just declare half of the tests to be "not API", but in fact it is, that's what people use and that's what they want to be sure that it works - just different versions of it act differently. > If, for example, some error-text comes directly from underlying > library and extension doesn't have control over it it shouldn't be > part of API. In this case we can test that "some error-text was > returned" but we shouldn't test for exact text-match How do you know that "some text" is the error and that it's the correct one and not just generic "wrong library call" one which is produced on any bad call? And you can't just declare that number formatting routine returns "some text" - it would be useless. You want very specific text. But what if some detail of that text changes for some of the test cases? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com