Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JLPDevs - Web Application Unit Testing: Strateg...

JLPDevs - Web Application Unit Testing: Strategy and Tools

JLP Community

December 05, 2015
Tweet

More Decks by JLP Community

Other Decks in Programming

Transcript

  1. Web Application Unit Testing Challenge: Too much dependency  Network

    (HTTP Request)  Database  Third Party Library  File System (upload / download file) Tools:  PHPUnit (Unit testing framework)  Mockery (Mock Object)  Faker (Fake Object)  PHP-DI / Pimple (Dependency Injection Library)
  2. Web Application Unit Testing (3) Assertion: Compare expected and actual

    value  AssertTrue()  AssertNotNull()  AssertEquals()  AssertArrayHasKey()  AssertClassHasAttribute()  Etc. https://phpunit.de/manual/current/en/phpunit-book.html#appendixes.assertions