<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Maintainable Unit Tests with PHPUnit</title>
	<atom:link href="http://carouth.com/2009/11/05/maintainable-unit-tests-with-phpunit/feed/" rel="self" type="application/rss+xml" />
	<link>http://carouth.com/2009/11/05/maintainable-unit-tests-with-phpunit/</link>
	<description>Ramblings of a Web Application Developer</description>
	<lastBuildDate>Tue, 27 Jul 2010 08:58:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jcarouth</title>
		<link>http://carouth.com/2009/11/05/maintainable-unit-tests-with-phpunit/comment-page-1/#comment-77</link>
		<dc:creator>jcarouth</dc:creator>
		<pubDate>Thu, 05 Nov 2009 21:38:21 +0000</pubDate>
		<guid isPermaLink="false">http://carouth.com/?p=126#comment-77</guid>
		<description>Fair point on the constructor signature. It probably is a bad example. I&#039;ll try to come up with a new one.

Regarding using setUp() to instantiate an instance of the UUT, I think the  problem I was trying to solve was avoiding constructing an instance in setUp() and then for the handful of test cases that need a different configuration re-instantiating the class. How do you handle such cases?</description>
		<content:encoded><![CDATA[<p>Fair point on the constructor signature. It probably is a bad example. I&#8217;ll try to come up with a new one.</p>
<p>Regarding using setUp() to instantiate an instance of the UUT, I think the  problem I was trying to solve was avoiding constructing an instance in setUp() and then for the handful of test cases that need a different configuration re-instantiating the class. How do you handle such cases?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Weier O'Phinney</title>
		<link>http://carouth.com/2009/11/05/maintainable-unit-tests-with-phpunit/comment-page-1/#comment-76</link>
		<dc:creator>Matthew Weier O'Phinney</dc:creator>
		<pubDate>Thu, 05 Nov 2009 19:58:14 +0000</pubDate>
		<guid isPermaLink="false">http://carouth.com/?p=126#comment-76</guid>
		<description>I see two issues with your examples. First, if you&#039;re changing a constructor signature, that&#039;s introducing a regression, plain and simple. You&#039;re breaking a behavior and an expectation.

Second, why are you instantiating the object in each test case method? PHPUnit provides a facility for this very thing via it&#039;s setUp() method. Most test cases I write will assign an instance of the UUT in setUp(), and then the test case methods will reference this when doing their work; you can also do this with dependencies. This provides a single location to touch per UUT when making changes.</description>
		<content:encoded><![CDATA[<p>I see two issues with your examples. First, if you&#8217;re changing a constructor signature, that&#8217;s introducing a regression, plain and simple. You&#8217;re breaking a behavior and an expectation.</p>
<p>Second, why are you instantiating the object in each test case method? PHPUnit provides a facility for this very thing via it&#8217;s setUp() method. Most test cases I write will assign an instance of the UUT in setUp(), and then the test case methods will reference this when doing their work; you can also do this with dependencies. This provides a single location to touch per UUT when making changes.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
