<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"	>
<channel>
	<title>Comments on: The Mockery: PHP Mock Objects Made Simple</title>
	<atom:link href="http://blog.astrumfutura.com/2010/05/the-mockery-php-mock-objects-made-simple/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.astrumfutura.com/2010/05/the-mockery-php-mock-objects-made-simple/</link>
	<description>PHP, Zend Framework and Other Crazy Stuff</description>
	<lastBuildDate>Fri, 24 May 2013 01:08:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Padraic Brady</title>
		<link>http://blog.astrumfutura.com/2010/05/the-mockery-php-mock-objects-made-simple/#comment-1551</link>
		<dc:creator>Padraic Brady</dc:creator>
		<pubDate>Tue, 25 May 2010 10:37:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.astrumfutura.com/?p=415#comment-1551</guid>
		<description>Well, the closure bit is easy to find in Mock.php (copied in Generator.php for adding to class mock eval&#039;s also), and it&#039;s used only by Container.php. You can probably just move it to a static method on Mockery rather than have it as a closure.</description>
		<content:encoded><![CDATA[<p>Well, the closure bit is easy to find in Mock.php (copied in Generator.php for adding to class mock eval&#8217;s also), and it&#8217;s used only by Container.php. You can probably just move it to a static method on Mockery rather than have it as a closure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: berry__</title>
		<link>http://blog.astrumfutura.com/2010/05/the-mockery-php-mock-objects-made-simple/#comment-1550</link>
		<dc:creator>berry__</dc:creator>
		<pubDate>Tue, 25 May 2010 08:08:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.astrumfutura.com/?p=415#comment-1550</guid>
		<description>I&#039;ll switch sooner rather than later, too. The thing is though that it won&#039;t help with the issues I&#039;m having right now, as in, today, which is why I asked my question.

If there&#039;s only one place you&#039;re using closures, I might be tempted to fork it to a 5.2 version. I&#039;ll see about that later though.</description>
		<content:encoded><![CDATA[<p>I&#8217;ll switch sooner rather than later, too. The thing is though that it won&#8217;t help with the issues I&#8217;m having right now, as in, today, which is why I asked my question.</p>
<p>If there&#8217;s only one place you&#8217;re using closures, I might be tempted to fork it to a 5.2 version. I&#8217;ll see about that later though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Padraic Brady</title>
		<link>http://blog.astrumfutura.com/2010/05/the-mockery-php-mock-objects-made-simple/#comment-1546</link>
		<dc:creator>Padraic Brady</dc:creator>
		<pubDate>Sat, 22 May 2010 23:21:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.astrumfutura.com/?p=415#comment-1546</guid>
		<description>PHPSpec was abandoned for two reasons:

1. The API needed a rethink at the least to fit PHP&#039;s style. As it advanced, it began to lose the language argument with PHPUnit.

2. The BDD movement, being ever in flux, had started evolving adaptations to the original thinking. See Cucumber in Ruby for example.

PHPMock was renamed to Mockery in 2008 and underwent a refactoring/rewrite in early 2009 (when it was moved to Github). The current rewrite has other specific goals:

1. Implement loose mocking (default expectations are non-restrictive no longer distinguish between mocks and stubs).
2. Refocus class/object mocking solely around the idea of inheriting type. For example, partial mocks now require an object instance - instantiating within Mockery was a nightmare to do simply. And it missed the point - the only reason we manipulate classes/objects at all is to pass type checks. There&#039;s no other reason. And all the time, instantiating an object from PHP naturally was just plain obvious as the solution to the headaches this built into mocking solutions.
3. Implement a bi-directional mock system. In other words, you can follow either a mock object approach (as is tradition) or a Test Spy approach - the library won&#039;t care which you prefer. The first sets up initial expectations, the second uses the mock and then allows assertions on method calls - bit of a subtle difference. Compare jMock (or even EasyMock) with Mockito in Java, for example. The Test Spy elements are on a local branch here while I work on it - you can find glimmers of it in the Mock Object Recording feature.</description>
		<content:encoded><![CDATA[<p>PHPSpec was abandoned for two reasons:</p>
<p>1. The API needed a rethink at the least to fit PHP&#8217;s style. As it advanced, it began to lose the language argument with PHPUnit.</p>
<p>2. The BDD movement, being ever in flux, had started evolving adaptations to the original thinking. See Cucumber in Ruby for example.</p>
<p>PHPMock was renamed to Mockery in 2008 and underwent a refactoring/rewrite in early 2009 (when it was moved to Github). The current rewrite has other specific goals:</p>
<p>1. Implement loose mocking (default expectations are non-restrictive no longer distinguish between mocks and stubs).<br />
2. Refocus class/object mocking solely around the idea of inheriting type. For example, partial mocks now require an object instance &#8211; instantiating within Mockery was a nightmare to do simply. And it missed the point &#8211; the only reason we manipulate classes/objects at all is to pass type checks. There&#8217;s no other reason. And all the time, instantiating an object from PHP naturally was just plain obvious as the solution to the headaches this built into mocking solutions.<br />
3. Implement a bi-directional mock system. In other words, you can follow either a mock object approach (as is tradition) or a Test Spy approach &#8211; the library won&#8217;t care which you prefer. The first sets up initial expectations, the second uses the mock and then allows assertions on method calls &#8211; bit of a subtle difference. Compare jMock (or even EasyMock) with Mockito in Java, for example. The Test Spy elements are on a local branch here while I work on it &#8211; you can find glimmers of it in the Mock Object Recording feature.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Koen</title>
		<link>http://blog.astrumfutura.com/2010/05/the-mockery-php-mock-objects-made-simple/#comment-1545</link>
		<dc:creator>Koen</dc:creator>
		<pubDate>Sat, 22 May 2010 20:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.astrumfutura.com/?p=415#comment-1545</guid>
		<description>PHPMock (or is Mockery the successor?)

Can you tell me why PHPSpec was abandoned? It looked promising and it would be nice to have some BDD tools for PHP (though I believe one can develop in BDD spirit using tools like Mockery and PHPUnit).</description>
		<content:encoded><![CDATA[<p>PHPMock (or is Mockery the successor?)</p>
<p>Can you tell me why PHPSpec was abandoned? It looked promising and it would be nice to have some BDD tools for PHP (though I believe one can develop in BDD spirit using tools like Mockery and PHPUnit).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pádraic Brady</title>
		<link>http://blog.astrumfutura.com/2010/05/the-mockery-php-mock-objects-made-simple/#comment-1543</link>
		<dc:creator>Pádraic Brady</dc:creator>
		<pubDate>Fri, 21 May 2010 23:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.astrumfutura.com/?p=415#comment-1543</guid>
		<description>Hey Dagfinn,

The MO tests in PHPUnit run to about 56 (based on counting assertions and discrete tests without assertions - not just discrete tests of which there are less). Of course it also uses the PHPUnit sourced constraints/matchers which would increase the tally some more.

Mockery is currently closing in on 200 discrete tests and I expect at least another 50 before next weeks release ;).

The two are quite different in testing methodology which explains some of the difference. I employed TDD, so my tests are fine grained rather than amalgamated integration tests.

At least I haven&#039;t surpassed Zend_Feed with its mega 1500 assertion count across all components since I started writing it last Summer... That would be something.</description>
		<content:encoded><![CDATA[<p>Hey Dagfinn,</p>
<p>The MO tests in PHPUnit run to about 56 (based on counting assertions and discrete tests without assertions &#8211; not just discrete tests of which there are less). Of course it also uses the PHPUnit sourced constraints/matchers which would increase the tally some more.</p>
<p>Mockery is currently closing in on 200 discrete tests and I expect at least another 50 before next weeks release <img src='http://blog.astrumfutura.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>The two are quite different in testing methodology which explains some of the difference. I employed TDD, so my tests are fine grained rather than amalgamated integration tests.</p>
<p>At least I haven&#8217;t surpassed Zend_Feed with its mega 1500 assertion count across all components since I started writing it last Summer&#8230; That would be something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dagfinn Reiersøl</title>
		<link>http://blog.astrumfutura.com/2010/05/the-mockery-php-mock-objects-made-simple/#comment-1542</link>
		<dc:creator>Dagfinn Reiersøl</dc:creator>
		<pubDate>Fri, 21 May 2010 12:48:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.astrumfutura.com/?p=415#comment-1542</guid>
		<description>Last time I checked (OK, a year or so ago) the mock object implementation in SimpleTest was still more mature than in PHPUnit. I compared the number of tests for the mock object implementation, and if I remember correctly there were about three times as many in SimpleTest. You could try making that comparison with Mockery if you like. ;-)</description>
		<content:encoded><![CDATA[<p>Last time I checked (OK, a year or so ago) the mock object implementation in SimpleTest was still more mature than in PHPUnit. I compared the number of tests for the mock object implementation, and if I remember correctly there were about three times as many in SimpleTest. You could try making that comparison with Mockery if you like. <img src='http://blog.astrumfutura.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
