Unit testing for the
TYPO3 4.x core




Oliver Klee, T3DD10
Why write
unit tests for
 the Core?
Verify that your code
does what you expect
Make sure people
     won‘t break
      your code
Create a safety net
    for refactoring
„Reviewing patches is
like cleaning other
people's bathroom“
                  (OH)
Get your
patches
reviewed
more
quickly
(and write
easy-to-read,
well-
documented,
well-formatted
patches)
Let‘s get
some terms
  straight
The phpunit extension
             has it all
The phpunit extension
               has it all
phpunit (TYPO3 extension)
The phpunit extension
               has it all
phpunit (TYPO3 extension)
 PHPUnit (PEAR package)
The phpunit extension
               has it all
phpunit (TYPO3 extension)
 PHPUnit (PEAR package)

 Testrunner
 (back-end-...
The phpunit extension
               has it all
phpunit (TYPO3 extension)
 PHPUnit (PEAR package)

 Testrunner   Testrunne...
Two tests
meet in a
  bar ...
Two tests
Test   meet in a
         bar ...
Two tests
  Test      meet in a
Assertion     bar ...
Two tests
  Test      meet in a
Assertion     bar ...
  Test
  Test
Two tests
  Test      meet in a
Assertion     bar ...
  Test
  Test
Testcase
Two tests
  Test      meet in a
Assertion     bar ...
  Test
  Test
Testcase
Testcase
Two tests
  Test       meet in a
Assertion      bar ...
  Test
  Test
Testcase
Testcase
 Testsuite
Code   test-first
Code   test-first
Code   test-first

write
test
Code   test-first

write
test
Code    test-first

write          write
test           code
Code    test-first

write          write
test           code
Code    test-first

write          write
test           code
Code    test-first

write          write
test           code



                       refactor
Code    test-first

write          write
test           code



                       refactor
Upcoming SlideShare
Loading in...5
×

Unit testing for the TYPO3 4.x core (T3DD10)

1,126

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

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

No notes for slide































  • Unit testing for the TYPO3 4.x core (T3DD10)

    1. 1. Unit testing for the TYPO3 4.x core Oliver Klee, T3DD10
    2. 2. Why write unit tests for the Core?
    3. 3. Verify that your code does what you expect
    4. 4. Make sure people won‘t break your code
    5. 5. Create a safety net for refactoring
    6. 6. „Reviewing patches is like cleaning other people's bathroom“ (OH)
    7. 7. Get your patches reviewed more quickly
    8. 8. (and write easy-to-read, well- documented, well-formatted patches)
    9. 9. Let‘s get some terms straight
    10. 10. The phpunit extension has it all
    11. 11. The phpunit extension has it all phpunit (TYPO3 extension)
    12. 12. The phpunit extension has it all phpunit (TYPO3 extension) PHPUnit (PEAR package)
    13. 13. The phpunit extension has it all phpunit (TYPO3 extension) PHPUnit (PEAR package) Testrunner (back-end- module)
    14. 14. The phpunit extension has it all phpunit (TYPO3 extension) PHPUnit (PEAR package) Testrunner Testrunner (CLI (back-end- module) module)
    15. 15. Two tests meet in a bar ...
    16. 16. Two tests Test meet in a bar ...
    17. 17. Two tests Test meet in a Assertion bar ...
    18. 18. Two tests Test meet in a Assertion bar ... Test Test
    19. 19. Two tests Test meet in a Assertion bar ... Test Test Testcase
    20. 20. Two tests Test meet in a Assertion bar ... Test Test Testcase Testcase
    21. 21. Two tests Test meet in a Assertion bar ... Test Test Testcase Testcase Testsuite
    22. 22. Code test-first
    23. 23. Code test-first
    24. 24. Code test-first write test
    25. 25. Code test-first write test
    26. 26. Code test-first write write test code
    27. 27. Code test-first write write test code
    28. 28. Code test-first write write test code
    29. 29. Code test-first write write test code refactor
    30. 30. Code test-first write write test code refactor

    ×