PHPNW May 2009
php|tek MTA conference Chicago 19 th  to 22 nd  May
DPC Dutch PHP Conference 11 th  to 13 th  June Amsterdam (all in English)
ZendCon CfP ZendCon Call for Papers Open til 31 st  May Conference: San Jose, CA 19 th  to 22 nd  October
ZF 1.8 Zend Framework new version
Test Fest Newton Building Salford University Saturday 9 th  May 2009 12 - 4 pm
When/Where/Who <ul><li>Salford University
Newton Building
(get the train to Salford Crescent)
Saturday, 9 th  May 2009
YOU!! </li></ul>
Testing PHP <ul><li>PHP uses phpt tests, a type of unit test </li></ul>--TEST-- Hello world test --FILE-- <?php echo &quot...
Getting Set Up <ul><li>Download a VM
Set up your own system </li></ul>
Requirements <ul><li>PHP 5.3 code from  http://snaps.php.net
Build Environment (see later)
Text Editor
SVN Client
Upcoming SlideShare
Loading in...5
×

PHPNW Test Fest Pre-presentation

855

Published on

Slides from May's PHPNW meet. Some PHP community news plus information about Test Fest, what it is and how to get set up for it

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
855
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

PHPNW Test Fest Pre-presentation

  1. 1. PHPNW May 2009
  2. 2. php|tek MTA conference Chicago 19 th to 22 nd May
  3. 3. DPC Dutch PHP Conference 11 th to 13 th June Amsterdam (all in English)
  4. 4. ZendCon CfP ZendCon Call for Papers Open til 31 st May Conference: San Jose, CA 19 th to 22 nd October
  5. 5. ZF 1.8 Zend Framework new version
  6. 6. Test Fest Newton Building Salford University Saturday 9 th May 2009 12 - 4 pm
  7. 7. When/Where/Who <ul><li>Salford University
  8. 8. Newton Building
  9. 9. (get the train to Salford Crescent)
  10. 10. Saturday, 9 th May 2009
  11. 11. YOU!! </li></ul>
  12. 12. Testing PHP <ul><li>PHP uses phpt tests, a type of unit test </li></ul>--TEST-- Hello world test --FILE-- <?php echo &quot;Hello&quot;; ?> --CLEAN-- --EXPECT-- Hello
  13. 13. Getting Set Up <ul><li>Download a VM
  14. 14. Set up your own system </li></ul>
  15. 15. Requirements <ul><li>PHP 5.3 code from http://snaps.php.net
  16. 16. Build Environment (see later)
  17. 17. Text Editor
  18. 18. SVN Client
  19. 19. PHP coding ability
  20. 20. Enthusiasm </li></ul>
  21. 21. Build Environment <ul><li>Packages (for my system) </li><ul><li>php
  22. 22. build-essential
  23. 23. libxml2-dev
  24. 24. lcov </li></ul><li>For your system – RTFM until you can successfully run &quot;make test&quot; </li></ul>
  25. 25. Running Tests <ul><li>Unzip your PHP source
  26. 26. ./configure
  27. 27. make
  28. 28. make test
  29. 29. If you get to here, you're all set :) </li></ul>
  30. 30. Running One or Few Tests <ul><li>make test TESTS=/path/to/testfile.phpt
  31. 31. make test TESTS=/path/to/tests
  32. 32. Or use the run-tests.php script itself
  33. 33. export TEST_PHP_EXECUTABLE=<path to php source>/sapi/cli/php
  34. 34. $TEST_PHP_EXECUTABLE <path to php source>/run-tests.php tests/ext/spl/ </li></ul>
  35. 35. Generating Coverage Report <ul><li>make lcov </li><ul><li>optionally with TESTS= just like make test </li></ul><li>look for the directory lcov_html
  36. 36. open index.php in web browser </li></ul>
  37. 37. Coverage Report
  38. 38. SPL <ul><li>Standard PHP Library
  39. 39. A set of standard interfaces for common problems
  40. 40. Many different kinds of iterator
  41. 41. Presentation at TestFest about the extension </li></ul>
  42. 42. Why Should I Bother? <ul><li>Learn about compiling and testing PHP
  43. 43. Raffle for elephpants
  44. 44. May get a test accepted
  45. 45. We're going for beer afterwards </li></ul>
  46. 46. Test Fest Newton Building Salford University Saturday 9 th May 2009 12 - 4 pm
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×