<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>die musterdenker &#187; testing</title>
	<atom:link href="http://www.musterdenker.de/tag/testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.musterdenker.de</link>
	<description></description>
	<lastBuildDate>Sun, 11 Apr 2010 18:07:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Changing scope in PHP for unit testing</title>
		<link>http://www.musterdenker.de/2009/10/changing-scope-in-php-for-unit-testing/</link>
		<comments>http://www.musterdenker.de/2009/10/changing-scope-in-php-for-unit-testing/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 12:54:24 +0000</pubDate>
		<dc:creator>mathias</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.musterdenker.de/?p=189</guid>
		<description><![CDATA[Mathias Krieck recently publish an easy way to change scope of methods and variables.
The main use is for unit testing (e.g PHPUnit) when you need to access protected or private variables / methods. With his &#8220;Super Proxy&#8221; you do:
$oInstance = SuperProxy::getInstance("CLASSNAME", $aParams);
Whereas &#8220;$aParams&#8221; is an optional parameter. The return value &#8220;$oInstance&#8221; is an instance of [...]]]></description>
			<content:encoded><![CDATA[<p>Mathias Krieck recently publish an easy way to change scope of methods and variables.</p>
<p>The main use is for unit testing (e.g <a href="http://www.phpunit.de/" target="_self">PHPUnit</a>) when you need to access protected or private variables / methods. With his &#8220;<a href="http://phpclasses.waaf.net/browse/package/5659.html" target="_self">Super Proxy</a>&#8221; you do:</p>
<pre>$oInstance = SuperProxy::getInstance("CLASSNAME", $aParams);</pre>
<p>Whereas &#8220;$aParams&#8221; is an optional parameter. The return value &#8220;$oInstance&#8221; is an instance of the given class where everything is public. So you can access everything from outside.</p>
<p><strong>Stop!!!</strong><br />
Do you want to post a comment like &#8220;bad coding style&#8221; or something similar? First you should be aware that this helper is intended to be only used for unit testing or other meta programming, but NEVER in productive code.</p>
<p>I myself think that&#8217;s fine <img src='http://www.musterdenker.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  And of course it&#8217;s open source!</p>
<p>So please help Matze to win the &#8220;Innovation Award&#8221; by <a href="http://phpclasses.waaf.net/browse/package/5659.html" target="_blank">voting for him here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.musterdenker.de/2009/10/changing-scope-in-php-for-unit-testing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
