Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57395 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29881 invoked from network); 17 Jan 2012 13:09:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jan 2012 13:09:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:35822] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/75-02309-7F2751F4 for ; Tue, 17 Jan 2012 08:09:12 -0500 Received: by laam7 with SMTP id m7so947272laa.29 for ; Tue, 17 Jan 2012 05:09:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Xbt3P/pF5dyr+0m39Dw8oeLqZ25239brn5aRB3coEqA=; b=wnWbBWtEHN1B9lo3SVy9N7U4iTHQgOVaqsd4WPzKBsAyup7+sZz7HJcCnfBbNKsugv hxruEmN3eELgq1QaGN8H1EiMBdeLtYIvAZvx4Zha87BWNnoJosUFbMVa0R1na3ReNO+p znqHuJFqDDxZT1uzoGI2LWUqGskbVaWEYDYM8= MIME-Version: 1.0 Received: by 10.112.27.65 with SMTP id r1mr4175046lbg.33.1326805748054; Tue, 17 Jan 2012 05:09:08 -0800 (PST) Received: by 10.152.18.197 with HTTP; Tue, 17 Jan 2012 05:09:07 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Jan 2012 14:09:07 +0100 Message-ID: To: Jan Dolecek Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Reflection to remove final From: nikita.ppv@googlemail.com (Nikita Popov) On Mon, Jan 16, 2012 at 7:06 PM, Jan Dolecek wrote: > Hi, > > 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/. > > Can you include it into svn pls? > Thanks Why did you choose to make the argument to setFinal() optional? setAccessible() doesn't do this. Nikita