<?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: Testing with partial mock objects</title>
	<atom:link href="http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:12:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: kristofer buffington &#187; Blog Archive &#187; unit testing with cakephp - models</title>
		<link>http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/comment-page-1/#comment-49792</link>
		<dc:creator>kristofer buffington &#187; Blog Archive &#187; unit testing with cakephp - models</dc:creator>
		<pubDate>Sat, 29 Dec 2007 18:23:38 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/#comment-49792</guid>
		<description>[...] I found Testing with partial mock objects to be a fabulous [...]</description>
		<content:encoded><![CDATA[<p>[...] I found Testing with partial mock objects to be a fabulous [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker &#187; An alternative way to create arrays</title>
		<link>http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/comment-page-1/#comment-44843</link>
		<dc:creator>cakebaker &#187; An alternative way to create arrays</dc:creator>
		<pubDate>Mon, 17 Dec 2007 08:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/#comment-44843</guid>
		<description>[...] I use more and more mock objects when testing I often have to fake the results of some findAll calls. That means I have to create [...]</description>
		<content:encoded><![CDATA[<p>[...] I use more and more mock objects when testing I often have to fake the results of some findAll calls. That means I have to create [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/comment-page-1/#comment-42675</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 11 Dec 2007 16:30:07 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/#comment-42675</guid>
		<description>@Zach: Yes, you are right. In a recently started project I use mocks from the beginning and try to avoid using a database for unit testing. Up to now this works fine. The only &quot;disadvantage&quot; I encountered are the array structures you have to fake. They are quite complex, and it is easy to make mistakes... Maybe I will find a solution to make the array handling a bit easier.</description>
		<content:encoded><![CDATA[<p>@Zach: Yes, you are right. In a recently started project I use mocks from the beginning and try to avoid using a database for unit testing. Up to now this works fine. The only &#8220;disadvantage&#8221; I encountered are the array structures you have to fake. They are quite complex, and it is easy to make mistakes&#8230; Maybe I will find a solution to make the array handling a bit easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zach Cox</title>
		<link>http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/comment-page-1/#comment-41214</link>
		<dc:creator>Zach Cox</dc:creator>
		<pubDate>Sat, 08 Dec 2007 02:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/#comment-41214</guid>
		<description>I think a best practice would be, by default, to not use a database in unit tests, and strive to mock everything outside the class &amp; method you&#039;re testing so it&#039;s completely isolated.  A unit test should be testing a &quot;unit&quot; of code, which is one method.  Using a database in a unit test should probably be an exception, not a rule.

Plus, SimpleTest makes it sooo easy to create mock objects, we have no excuse not to!  :)</description>
		<content:encoded><![CDATA[<p>I think a best practice would be, by default, to not use a database in unit tests, and strive to mock everything outside the class &amp; method you&#8217;re testing so it&#8217;s completely isolated.  A unit test should be testing a &#8220;unit&#8221; of code, which is one method.  Using a database in a unit test should probably be an exception, not a rule.</p>
<p>Plus, SimpleTest makes it sooo easy to create mock objects, we have no excuse not to!  :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/comment-page-1/#comment-41002</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 07 Dec 2007 16:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/#comment-41002</guid>
		<description>@Zach: Thanks for your comment!

I think it depends on the situation whether it makes sense to use a database in unit tests. Sometimes it is useful to actually perform the database operations, but in most cases it simply slows down the execution of the tests.</description>
		<content:encoded><![CDATA[<p>@Zach: Thanks for your comment!</p>
<p>I think it depends on the situation whether it makes sense to use a database in unit tests. Sometimes it is useful to actually perform the database operations, but in most cases it simply slows down the execution of the tests.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zach Cox</title>
		<link>http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/comment-page-1/#comment-40678</link>
		<dc:creator>Zach Cox</dc:creator>
		<pubDate>Thu, 06 Dec 2007 17:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/04/testing-with-partial-mock-objects/#comment-40678</guid>
		<description>Thanks for this!  It bugs me that &quot;standard&quot; CakePHP unit testing practice is to set up test fixtures in an actual database.  Unit testing should not involve databases!</description>
		<content:encoded><![CDATA[<p>Thanks for this!  It bugs me that &#8220;standard&#8221; CakePHP unit testing practice is to set up test fixtures in an actual database.  Unit testing should not involve databases!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

