PHPNW Test Fest Pre-presentation

  • 757 views
Uploaded 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

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

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
757
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
12
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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