<?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>Mon, 20 May 2013 20:05:55 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Mike Purcell's Blog: PHPUnit - Constant Already Defined - -process-isolation]]></title>
      <guid>http://www.phpdeveloper.org/news/18056</guid>
      <link>http://www.phpdeveloper.org/news/18056</link>
      <description><![CDATA[<p>
In <a href="http://melikedev.com/2012/06/06/phpunit-constant-already-defined-process-isolation/">this new post</a> from <i>Mike Purcell</i> shares a solution to an error he came across in his unit testing - a "Constant already defined" message - and how he fixed it.
</p>
<blockquote>
When upgrading the unit tests I had no problem, it was only when I was trying to integrate into CruiseControl that this was happening. Well after some time, I finally figured out the issue was the "ant" command to execute the unit tests was passing the -process-isolation flag to phpunit.
</blockquote>
<p>
He found that when he called it with that flag, it was executed twice, resulting in the "already defined" message the second time. He fixed it by removing the extra flag. Another alternative is to wrap your constant definitions (and anything that dosen't need to be called/created again) in an "is defined" check.
</p>]]></description>
      <pubDate>Thu, 07 Jun 2012 08:43:25 -0500</pubDate>
    </item>
  </channel>
</rss>
