Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49731 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56377 invoked from network); 16 Sep 2010 20:11:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2010 20:11:34 -0000 Authentication-Results: pb1.pair.com header.from=ralph@smashlabs.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ralph@smashlabs.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain smashlabs.com from 67.15.58.61 cause and error) X-PHP-List-Original-Sender: ralph@smashlabs.com X-Host-Fingerprint: 67.15.58.61 openrce.org Linux 2.6 Received: from [67.15.58.61] ([67.15.58.61:60904] helo=users.smashlabs.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/1F-15036-3F9729C4 for ; Thu, 16 Sep 2010 16:11:32 -0400 Received: (qmail 18905 invoked from network); 16 Sep 2010 15:11:19 -0500 Received: from wsip-98-173-234-93.no.no.cox.net (HELO ralph-macbook.local) (98.173.234.93) by smashlabs.com with (AES256-SHA encrypted) SMTP; 16 Sep 2010 15:11:19 -0500 Message-ID: <4C9279F0.5060104@smashlabs.com> Date: Thu, 16 Sep 2010 15:11:28 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: Guilherme Blanco CC: Stas Malyshev , Gustavo Lopes , Derick Rethans , "internals@lists.php.net" References: <4C873C0F.1010200@zend.com> <4C879613.7090709@zend.com> <4C887D2B.2000605@zend.com> <4C8AC526.7000505@sugarcrm.com> <4C8B6168.30504@mohiva.com> <4C8BC81E.8000605@sugarcrm.com> <7.0.1.0.2.20100913145703.0d226d90@zend.com> <4C926574.8030805@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: PHP Annotations RFC + Patch From: ralph@smashlabs.com (Ralph Schindler) I know this is drive-by/chiming in, but we've had this discussion with the ZF community. While @expectedExcpetion is a feature of PHPUnit that has been picked up and used by developers over the past few years, it semantically makes no sense, and we have since outlawed its usage. Why? B/c a "comment" is now affecting the outcome/execution of a code block (in this case a unit test), ... particularly the way the PHPUnit system interprets the outcome of this code block. We've since removed all @expectedException "annotations" in favor of $this->setExpectedException() call and try/catch blocks for more specific usage. It just semantically makes more sense to our group of developers. On the other hand, we DO utilize the @group annotation in PHPUnit b/c it does a fantastic job of grouping tests together. Case in point, @group does not ever affect the running outcome of tests. > app. Example: > > class FakeTest extends \PHPUnit_Framework_TestCase > { > /** > * @expectedException RuntimeException > */ > public function testShouldThrowException() > { > throw new \RuntimeException('FakeTest failed.'); > } > } >