Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57392 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25079 invoked from network); 17 Jan 2012 12:55:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jan 2012 12:55:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:64034] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/64-02309-2BF651F4 for ; Tue, 17 Jan 2012 07:55:15 -0500 Received: by vcbfo11 with SMTP id fo11so1081438vcb.29 for ; Tue, 17 Jan 2012 04:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=QnbPhYz1MU/lknT0ubEa9Azg7aTr6W+uxKHJWIXKu4s=; b=wvGwnwT17A3FO56wzJ+3D6ZSasegOQg/u8q2yW6NrVIjZ/WrNzQE/e7FM5VZd/e/wg gOUSOI5/SrRmHL6zWFnUCAQtfnrfVHaD5Ix9mqKvhND+2NxEjziS86R2B5MlVor5SoCX kHYyiLRzdG6PUssQbaVmdr5L9ax3Uvl9wMHP0= Received: by 10.220.148.132 with SMTP id p4mr9975177vcv.31.1326804912242; Tue, 17 Jan 2012 04:55:12 -0800 (PST) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.220.7.19 with HTTP; Tue, 17 Jan 2012 04:54:51 -0800 (PST) In-Reply-To: <4F154BCE.4090000@php.net> References: <4F154BCE.4090000@php.net> Date: Tue, 17 Jan 2012 20:54:51 +0800 X-Google-Sender-Auth: 1aEuM_mRP0tV5K6GfmN18jJd2rM Message-ID: To: Sebastian Bergmann Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Reflection to remove final From: laruence@php.net (Laruence) On Tue, Jan 17, 2012 at 6:22 PM, Sebastian Bergmann wro= te: > Am 16.01.2012 19:06, schrieb Jan Dolecek: >> reflection is a great tool for testing, but it still misses support >> for mocking classes/methods marked as final. I created a small patch >> https://gist.github.com/1621839#file_php_finals.patch, examples how to >> use it https://gist.github.com/1621839#file_final_test.php and wrote a >> short article explaining it: >> http://blog.juzna.cz/2012/01/mock-vs-final-fights-in-testing/. > > =C2=A0+1 from me for the idea. Implementation looks good at first glance = as > =C2=A0well, but I let more knowledgable C developers be the judge of that= . if a class is marked as final, there must be some reason for it to be a fin= al. if you remove the final and extends it, may lead to bad error. thanks > > -- > Sebastian Bergmann =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0Co-Founder and Principal Consultant > http://sebastian-bergmann.de/ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://thePHP.cc/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --=20 Laruence =C2=A0Xinchen Hui http://www.laruence.com/