<?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>Wed, 22 May 2013 06:21:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Chris Jones: Using the PHP CLI Webserver to Identify and Test Memory Issues in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18361</guid>
      <link>http://www.phpdeveloper.org/news/18361</link>
      <description><![CDATA[<p>
<i>Chris Jones</i> has a new post today showing how you can <a href="https://blogs.oracle.com/opal/entry/using_the_php_cli_webserver">use PHP 5.4's built-in web server</a> to help test for memory issues in your application (and the language).
</p>
<blockquote>
Rasmus mentioned on IRC how he ran the [command line] tests: simply renaming the ".phpt" test files as ".php", and invoking them through the CLI webserver. The SKIPIF sections get executed, but that doesn't affect the desired outcome of testing multiple HTTP requests with different input scripts. [Here] are some quick shell scripts I put together to automate testing the OCI8 extension with valgrind.
</blockquote>
<p>
He uses the OCI8 extension as an example, showing how to set up these scripts to enable the execution of the tests, fire up the web server and execute Valgrind to help monitor the memory of the execution.
</p>]]></description>
      <pubDate>Wed, 15 Aug 2012 08:35:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[QaFoo.com: Testing file uploads with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15571</guid>
      <link>http://www.phpdeveloper.org/news/15571</link>
      <description><![CDATA[<p>
On the QaFoo.com site <i>Manuel Pichler</i> has posted a new tutorial about using unit testing, specifically with <a href="http://phpunit.de">PHPUnit</a> (really ending up on <a href="http://qa.php.net/phpt_details.php">phpt</a>) to test and be sure that your file upload handling is working correctly.
</p>
<blockquote>
A question I am asked on a regular basis is, how you can test a file upload with PHP. In this blog post, I take a precise look at this topic and show you how to test your file uploads from within your standard testing environment, using widely unknown testing framework for PHP.
</blockquote>
<p>
He shows how to use a custom $_FILES superglobal to mimic the upload process noting, however, that this won't work due to possible file handling on the backend. His alternative is to use a phpt test to push a raw posted file to the application and then check the results. He then shows how to take these functioning tests and drop them back into PHPUnit via it's "PhpTestCase" handling. You can find full code examples <a href="https://github.com/Qafoo/blog-examples/tree/master/testing_file_uploads">here</a>.
</p>]]></description>
      <pubDate>Mon, 13 Dec 2010 13:53:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Rafael Dohms' Blog: PHPT: Writing tests for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/13106</guid>
      <link>http://www.phpdeveloper.org/news/13106</link>
      <description><![CDATA[<p>
If you've ever wanted to give back to the PHP project, but weren't sure quite how, <i>Rafael Dohms</i> has <a href="http://www.rafaeldohms.com.br/2009/08/23/writing-tests-with-phpt/en/">written up a post</a> to make one of the options much easier to get into - writing PHPT tests for the PHP language.
</p>
<blockquote>
The beauty about PHPT is that you need to know very little other than writing PHP code. A little knowledge into the inner workings of PHP will of course help you in finding areas of code that need testing, and how best to test them, but just knowing PHP is enough to start.
</blockquote>
<p>
He leads you through a five step process that'll have you up and writing tests in no time - setting up your environment, looking for something to test, writing and executing a test and submitting the results back to the PHP project. He sprinkles in a few code bits and screenshots to help point you in the right direction.
</p>]]></description>
      <pubDate>Tue, 25 Aug 2009 12:05:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Testing PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12451</guid>
      <link>http://www.phpdeveloper.org/news/12451</link>
      <description><![CDATA[<p>
In <a href="http://www.lornajane.net/posts/2009/Testing-PHP">this new post</a> to her blog <i>Lorna Mitchell</i> talks a bit about the <a href="http://upcoming.yahoo.com/event/2299548/">upcoming TestFest event</a> happening in Manchester next weekend and what she's learned about testing PHP to make things flow a bit smoother for her while there (and you, should you want to write tests in the future).
</p>
<blockquote>
In preparation I decided it was high time to sit down and figure out what testing PHP is all about. People kept telling me it was easy but I had no clear picture of how all the pieces went together - there are different ways of doing the same thing and although I have been keen to get involved with testing for some time, I haven't been able to get started until now.
</blockquote>
<p>
She looks at the automated tests as a part of the build ("make test") and some of the <a href="http://www.lornajane.net/uploads/tech/lcov.png">screens</a> from the <a href="http://www.lornajane.net/uploads/tech/lcov2.serendipityThumb.png">lcov</a> <a href="http://www.lornajane.net/uploads/tech/lcov3.png">testing</a> results. She also recommends reading up on <a href="http://qa.php.net/write-test.php">the phpt documentation</a> to help you get going.
</p>]]></description>
      <pubDate>Mon, 04 May 2009 12:06:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Koopmanschap's Blog: TestFest is back!]]></title>
      <guid>http://www.phpdeveloper.org/news/12415</guid>
      <link>http://www.phpdeveloper.org/news/12415</link>
      <description><![CDATA[<p>
In a <a href="http://www.leftontheweb.com/message/TestFest_is_back">recent blog post</a> <i>Stefan Koopmanschap</i> reminds the PHP development community that the PHP TestFest is back again this year!
</p>
<blockquote>
Last year's TestFest was a huge success. The worldwide initiatives by usergroups and individuals gave a nice addition to the code coverage for PHP itself. This year, the TestFest period has been extended to 3 months, starting the beginning of this month and ending end of june. But a nice bunch of European usergroups including the Dutch usergroup are combining TestFest on may 9th!
</blockquote>
<p>
TestFest events are happening all over the world - you can see if there's one near you on <a href="http://wiki.php.net/qa/testfest">this page</a> of the PHP.net wiki. For those attending <a href="http://tek.mtacon.com">php|tek</a> this year, there'll also be a TestFest going on during the <a href="http://tek.mtacon.com/c/s/hackathon">Hackathon</a> event (read our interview about the event <a href="http://www.phpdeveloper.org/news/12403">here</a>).
</p>]]></description>
      <pubDate>Tue, 28 Apr 2009 08:46:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Greg Beaver's Blog: Code Coverage Reporting using PEAR, PEAR2, phar, and sqlite3]]></title>
      <guid>http://www.phpdeveloper.org/news/12338</guid>
      <link>http://www.phpdeveloper.org/news/12338</link>
      <description><![CDATA[<p>
<i>Greg Beaver</i> <a href="http://greg.chiaraquartet.net/archives/200-code-coverage-reporting-using-PEAR,-PEAR2,-phar,-and-sqlite3.html">has a new post reporting on his latest efforts</a> to improve the Pyrus PEAR installer and to make it a more strong, stable and robust end result.
</p>
<blockquote>
One of the problems I found when designing the new code for PEAR 1.4.0 (back in the day) was that it was very difficult to determine whether changes would break things.  The main problem revolves around the colossal size of the test suite. [...] This is a real problem when trying to develop with any kind of flow.  If, after every change, one needs to sit through 35 minutes of tests, one will never develop anything of substance.
</blockquote>
<p>
What he wanted was an application that could detect only the files modified and tests those with the results put into the code coverage report. To fill the need, he created <a href="http://cvs.php.net/viewvc.cgi/pear-core/test-modified.php?view=co&revision=1.4&content-type=text%2Fplain">test-modified.php</a> to run just the <a href="http://greg.chiaraquartet.net/exit.php?url_id=692&entry_id=200">phpt</a> tests needed.
</p>]]></description>
      <pubDate>Tue, 14 Apr 2009 12:08:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Roy Ganor's Blog: Welcome the PDTT - PHP 5.3 Code Assist Engine Tests]]></title>
      <guid>http://www.phpdeveloper.org/news/12149</guid>
      <link>http://www.phpdeveloper.org/news/12149</link>
      <description><![CDATA[<p>
As <a href="http://devzone.zend.com/article/4357-PHP-5.3-PDT-PDTT---Help-Welcomed"">mentioned on the Zend Developer Zone</a> today, the group working on the <a href="http://www.eclipse.org/pdt/">Eclipse PDT extension</a> has been working hard to get the tool ready for PHP 5.3 when its released and are now looking to the community to help them with some testing.
</p>
<p>
<i>Roy Ganor</i> <a href="http://ganoro.blogspot.com/2009/03/welcome-pdtt-php-53-code-assist-tests.html">explains in his blog</a>:
</p>
<blockquote>
Since <a href="http://spektom.blogspot.com/">Michael</a> has just <a href="http://spektom.blogspot.com/2009/03/php-53-support-in-pdt-2nd-stage-is-over.html">finished</a> implementing the second phase for PHP 5.3 support in PDT, we can now expose unit tests and ask users to add more cases to the code assist tests repository.
</blockquote>
<p>
His post includes the basic format for the tests (as written in <a href="http://wiki.eclipse.org/PDTT_-_PHP_5.3_Code_Assist_Tests">pdtt</a>, a clone of the <a href="http://phpt.info/">phpt</a> format) and a clip from the PDT wiki page about why they need them. There's no automatic way to submit them but if you want more information on the project and testing, you can always <a href="mailto:pdt-dev@eclipse.org">send them an email</a> to find out more.
</p>]]></description>
      <pubDate>Tue, 17 Mar 2009 08:44:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Greg Beaver's Blog: Pyrus, PEAR2 and web code coverage report for phpt-based tests]]></title>
      <guid>http://www.phpdeveloper.org/news/11960</guid>
      <link>http://www.phpdeveloper.org/news/11960</link>
      <description><![CDATA[<p>
<i>Greg Beaver</i> has <a href="http://greg.chiaraquartet.net/archives/199-Pyrus,-PEAR2-and-web-code-coverage-report-for-phpt-based-tests.html">posted an update</a> one some of the things he's been working on in the realm of his projects - Pyrus, PEAR2 and code coverage for phpt-based tests.
</p>
<blockquote>
In any case, now that work on ext/phar has shifted primarily to maintenance mode, and namespaces are finally ancient history, I've shifted all of my coding energy to getting Pyrus, PEAR's next-generation installer, ready to ship.
</blockquote>
<p>
Pyrus is the PEAR installer as rewritten for the next major PHP release (5.3) and uses a lot of the new features it offers (including full archive support, SQLite 3, combined configuration files and several new developer-centric additions). He also includes a sample bit of code that he worked up to run code coverage reports against the PEAR packages. He includes links to <A href="http://greg.chiaraquartet.net/exit.php?url_id=687&entry_id=199">three</a> <a href="http://greg.chiaraquartet.net/exit.php?url_id=688&entry_id=199">different</a> <a href="http://greg.chiaraquartet.net/exit.php?url_id=689&entry_id=199">examples</a> of the report's output.
</p>]]></description>
      <pubDate>Tue, 17 Feb 2009 09:31:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: NetBeans plugin for running phpt tests]]></title>
      <guid>http://www.phpdeveloper.org/news/11593</guid>
      <link>http://www.phpdeveloper.org/news/11593</link>
      <description><![CDATA[<p>
In a <a href="http://schlueters.de/blog/archives/95-NetBeans-plugin-for-running-phpt-tests.html">new post to his blog</a> today <i>Johannes Schluter</i> talks about a plugin for the NetBeans IDE that allows you to run tests for PHP's regression test suite right in the editor.
</p>
<blockquote>
<p>
The test system therefore produces a bunch of files, a file containing the expected output, one containing the actual output and a diff between these as relevant files. The problem there is that the diff, for being portable, is using a quite simple mechanism which only shows the lines which differ without any context. 
</p>
<p>[...] Lately I've changed my way of working and use vim less, I still use it, but I use NetBeans as an IDE more and more. So I thought a bit about that test issue and searched my brain for my Java skills and started playing around to see whether I manage to write a NetBeans plugin which can run the tests and report the results in a usable way.
</p>
</blockquote>
<p>
Hes <a href="https://launchpad.net/phpttestrunner">created a project</a> for the plugin (where you can download the latest version - <a href="https://launchpad.net/phpttestrunner/trunk/0.6.0">0.6.0</a>) and install it to your local IDE copy. It adds a toolbar icon, asks for the location of the binaries to test and runs the diff quickly and easily. You can see a screenshot of the tool <a href="http://schlueters.de/~johannes/nb-phpttest.png">in action here</a>.
</p>]]></description>
      <pubDate>Thu, 18 Dec 2008 09:35:16 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Maarten Manders' Blog: Static + Unit Tests = Arrrghhh!]]></title>
      <guid>http://www.phpdeveloper.org/news/10791</guid>
      <link>http://www.phpdeveloper.org/news/10791</link>
      <description><![CDATA[<p>
Take <a href="http://techblog.tilllate.com/2008/08/07/static-unit-tests-arrrghhh/">a hint</a> from <i>Maarten Manders</i> when renaming and moving around your unit testing order:
</p>
<blockquote>
It's absolutely amazing how much you can mess up unit tests just by changing their order! (Trevi_* comes after Tilllate_*) Everyone knows that tests are supposed to be independent. But we all know how it is.
</blockquote>
<p>
He <a href="http://techblog.tilllate.com/2008/08/07/static-unit-tests-arrrghhh/">asks for recommendations</a> on what to do to help the situation. Comments on the post (including ones from <i>Lukas Smith</i> and <i>Sebastian Bergmann</i>) mention using PHPT, a new version of PHPUnit that will do just what he wants and whether or not to use Singletons.
</p>]]></description>
      <pubDate>Fri, 08 Aug 2008 10:23:08 -0500</pubDate>
    </item>
  </channel>
</rss>
