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

Test-driven development for TYPO3

Test-driven development for TYPO3

Slides of my workshop on T3DD14

Oliver Klee

June 21, 2014
Tweet

More Decks by Oliver Klee

Other Decks in Programming

Transcript

  1. The phpunit extension has it all phpunit (TYPO3 extension) PHPUnit

    (Composer package) Testrunner (back-end- module) Testrunner
 (CLI module) Testing framework for FE & DB
  2. Test suite Test case Test Two tests meet in a

    bar ... Assertion Test Test Test case
  3. The life cycle of a unit test new FooTest(); setUp();

    /** @test */ lifeIsGood(); tearDown();
  4. Use meaningful unit test names classCanBeInstantiated setTitleSetsTitle setSizeWithZeroThrowsException hasTitleForEmptyTitleReturnsFalse Name

    the behavior. Name the preconditions. Mention the method. Dont‘t use "works" or "correctly". measureFrubbleWorksCorrectly