<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 12:16:33 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Ryan Mauger's Blog: Controller Testing with the FlashMessenger in Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/17685</guid>
      <link>http://www.phpdeveloper.org/news/17685</link>
      <description><![CDATA[<p>
<i>Ryan Mauger</i> has a new post to his blog today looking at doing some <a href="http://www.rmauger.co.uk/2012/03/controller-testing-with-the-flashmessenger-in-zend-framework/">controller testing in a Zend Framework application</a> and some issues he was with the FlashMessenger component.
</p>
<blockquote>
During a recent project, I encountered problems with the flash messenger not playing ball with PHPUnit. The problem, the FlashMessenger using a session namespace, and trying to start the session. Additionally to this problem, how do you test that the flash message is set as you'd expect (or not as the case may be). The answer to both of these problems, lies in the same solution. a Mock Object.
</blockquote>
<p>
He includes the code to mock out the FlashMessenger component and expose the "addMessage" method. In his first test, the assertion is that this method is never called (failure if it is) and in the second, it should only be called once.
</p>]]></description>
      <pubDate>Fri, 16 Mar 2012 11:55:53 -0500</pubDate>
    </item>
  </channel>
</rss>
