Skip to content
PHPUnit Presentation
JavaScript CSS PHP Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
present
.gitignore
LICENSE
README.md
composer.json
composer.lock

README.md

PHPUnit Presentation

Overview

  1. What is PHPUnit specifically and Unit Testing generally
    • Unit Testing Framework
      • Basically the standard in PHP Unit Testing Frameworks
    • Install
      • Composer
      • or Pear
      • or Phar
    • What is Unit Testing
      • Unit Testing is testing individual units of code (ie single method/function) to verify it works the way you want it to today, it works the way you expect it to in the future and it doesn't get broken down the road
      • If you aren't unit testing you should be, it makes your life so much better
      • Unit Testing is supposed to test things in isolation as much as possible (further explain down the road) but basically we want to test just the method not the dependencies
    • Why should we unit test
  2. Simple Cases of using PHPUnit to Unit Test Code
    • add
    • subtract
    • multiply with dataProviders and incomplete test
    • exceptedException
  3. Slightly more Complex Case
    • Some more complex examples of tests
  4. Mocking Objects with Mockery
    • PHPUnit Mocking is ok, but we can do better
  5. Code Coverage
  6. Questions
You can’t perform that action at this time.