<?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>飞扬轻狂&#039;s blog &#187; unit test</title>
	<atom:link href="http://blog.fallseir.com/tag/unit-test/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fallseir.com</link>
	<description>我心飞扬 我意轻狂</description>
	<lastBuildDate>Thu, 06 May 2010 07:13:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/><cloud domain='blog.fallseir.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>使用反射 实现的 简单的 单元测试框架</title>
		<link>http://blog.fallseir.com/2009/04/php_simple_unit_test/</link>
		<comments>http://blog.fallseir.com/2009/04/php_simple_unit_test/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 06:37:06 +0000</pubDate>
		<dc:creator>飞扬轻狂</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[unit test]]></category>
		<category><![CDATA[小代码]]></category>

		<guid isPermaLink="false">http://blog.fallseir.com/?p=127</guid>
		<description><![CDATA[使用反射 实现的 简单的 单元测试框架 &#8211; 原文 (飞扬轻狂,fallseir) 20090427 ==== generalized test methods use introspection ==== class customClass{ function selfTest(){[..] return [message&#124;false]} } class tester{ function test($thing){ if(is_object($thing)){ if(method_exists($thing,'selfTest')){ $this->handleTest(call_user_method('selfTest',$thing)); } }else if(is_array($thing)){ foreach($thing as $component){ $this->test($component); } }else{ ;//ignore if not an array or object } } function handleTest($result){if($result)print "Warning $result";} } 参考: John.Wiley.and.Sons.PHP5.and.MySQL.Bible]]></description>
			<content:encoded><![CDATA[<p>使用反射 实现的 简单的 单元测试框架<br />
&#8211; <a href="http://blog.fallseir.com/2009/04/php_simple_unit_test/">原文</a> (飞扬轻狂,fallseir) 20090427<br />
==== generalized test methods use introspection ====</p>
<pre>
class customClass{
  function selfTest(){[..] return [message|false]}
}
class tester{
  function test($thing){
    if(is_object($thing)){
      if(method_exists($thing,'selfTest')){
        $this->handleTest(call_user_method('selfTest',$thing));
      }
    }else if(is_array($thing)){
      foreach($thing as $component){ $this->test($component); }
    }else{
    ;//ignore if not an array or object
    }
  }
  function handleTest($result){if($result)print "Warning $result";}
}
</pre>
<p>参考:<br />
John.Wiley.and.Sons.PHP5.and.MySQL.Bible</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fallseir.com/2009/04/php_simple_unit_test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
