Test-Driven Developmentfor TYPO3Oliver Klee, 2011-07-08typo3-coding@oliverklee.de
Unittests?
Manual testing is cumbersome
Automatedtesting isfast
Unit tests for the Realty Manager   extension
more than1600 tests
in less than 60    seconds
Verify that your codedoes what you expect
Make sure that yourchanges won‘t break           anything
Keep        other codersfrom breaking your code
Don‘t break anythingeven in complex projects
Create asafety net   for refactoring
Green feels good!
Green feels good!
Know   your  tools
The phpunit extension             has it all
The phpunit extension               has it allphpunit (TYPO3 extension)
The phpunit extension               has it allphpunit (TYPO3 extension) PHPUnit (PEAR package)
The phpunit extension               has it allphpunit (TYPO3 extension) PHPUnit (PEAR package) Testrunner (back-end-  modu...
The phpunit extension               has it allphpunit (TYPO3 extension) PHPUnit (PEAR package) Testrunner    Testrunner (b...
The phpunit extension               has it allphpunit (TYPO3 extension) PHPUnit (PEAR package)  Testing framework for FE &...
Let‘s getsome terms  straight
Two testsmeet in a  bar ...
Two testsTest   meet in a         bar ...
Two tests  Test      meet in aAssertion     bar ...
Two tests  Test      meet in aAssertion     bar ...  Test  Test
Two tests  Test      meet in aAssertion     bar ...  Test  TestTest case
Two tests  Test      meet in aAssertion     bar ...  Test  TestTest caseTest case
Two tests  Test       meet in aAssertion      bar ...  Test  TestTest caseTest caseTest suite
The   life cycle unit test               of a
The   life cycle unit test               of a
The   life cycle unit test               of a                      new FooTest();
The   life cycle unit test               of a                      new FooTest();
The   life cycle unit test               of a                      new FooTest();                           setUp();
The   life cycle unit test               of a                      new FooTest();                           setUp();      ...
The   life cycle unit test               of a                      new FooTest();                           setUp();      ...
The   life cycle unit test               of a                      new FooTest();                           setUp();      ...
The   life cycle unit test               of a                      new FooTest();                           setUp();      ...
The   life cycle unit test               of a                      new FooTest();                           setUp();      ...
Use   meaningful           unit test   names
Use   meaningful                          unit test   namesName thebehavior.            classCanBeInstantiated
Use   meaningful                            unit test   names Name the behavior.             classCanBeInstantiatedMention...
Use   meaningful                                 unit test   names  Name the  behavior.                 classCanBeInstanti...
Use   meaningful                                 unit test   names  Name the  behavior.                 classCanBeInstanti...
Use   meaningful                                   unit test   names  Name the  behavior.                   classCanBeInst...
Use   meaningful                                   unit test   names  Name the  behavior.                   classCanBeInst...
Code   test-first
Code   test-first
Code   test-firstwritetest
Code   test-firstwritetest
Code    test-firstwrite          writetest           code
Code    test-firstwrite          writetest           code
Code    test-firstwrite          writetest           code
Code    test-firstwrite          writetest           code                       refactor
Code    test-firstwrite          writetest           code                       refactor
There are small and huge              tests
Unit tests are        small and fast
Integration tests test  the complete thing
Automated click tests    test the interface
Automated click tests    test the interface              Selenium
Blackbox tests       test        the   public interface
Whitebox tests   test the       inner workings
The   testing framework                 is created quickly	   /**	    * @var Tx_Phpunit_Framework	    */	   protected $tes...
The   testing framework                 is created quickly	   /**	    * @var Tx_Phpunit_Framework	    */	   protected $tes...
The   testing framework                 is created quickly	   /**	    * @var Tx_Phpunit_Framework	    */	   protected $tes...
The   testing framework              can fake almost everything
The   testing framework              can fake almost everything         $recordUid = $tf->createRecord($tableName, array $...
The   testing framework              can fake almost everything         $recordUid = $tf->createRecord($tableName, array $...
The   testing framework              can fake almost everything         $recordUid = $tf->createRecord($tableName, array $...
The   testing framework              can fake almost everything         $recordUid = $tf->createRecord($tableName, array $...
The   testing framework              can fake almost everything             $recordUid = $tf->createRecord($tableName, arr...
The   testing framework              can fake almost everything             $recordUid = $tf->createRecord($tableName, arr...
The   testing framework              can fake almost everything             $recordUid = $tf->createRecord($tableName, arr...
The   testing framework              can fake almost everything             $recordUid = $tf->createRecord($tableName, arr...
The   testing framework              can fake almost everything             $recordUid = $tf->createRecord($tableName, arr...
The   testing framework              can fake almost everything             $recordUid = $tf->createRecord($tableName, arr...
The   testing framework              can fake almost everything
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything      $pageUid = $tf->createFrontEndPage($parentId = 0, arr...
The   testing framework              can fake almost everything       $pageUid = $tf->createFrontEndPage($parentId = 0, ar...
The   testing framework              can fake almost everything       $pageUid = $tf->createFrontEndPage($parentId = 0, ar...
The   testing framework              can fake almost everything
The   testing framework              can fake almost everything            $recordUid = $tf->createBackEndUser(array $reco...
The   testing framework              can fake almost everything              $recordUid = $tf->createBackEndUser(array $re...
The   testing framework              can fake almost everything
The   testing framework              can fake almost everything          $path = $tf->createDummyFile($fileName = test.txt...
The   testing framework                can fake almost everything                    $path = $tf->createDummyFile($fileNam...
The   testing framework                can fake almost everything                    $path = $tf->createDummyFile($fileNam...
The   testing framework                can fake almost everything                    $path = $tf->createDummyFile($fileNam...
The   testing framework                can fake almost everything                    $path = $tf->createDummyFile($fileNam...
Test-driven development for TYPO3 (T3DD11)
Upcoming SlideShare
Loading in …5
×

Test-driven development for TYPO3 (T3DD11)

1,630 views

Published on

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

No Downloads
Views
Total views
1,630
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
0
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Test-driven development for TYPO3 (T3DD11)

    1. 1. Test-Driven Developmentfor TYPO3Oliver Klee, 2011-07-08typo3-coding@oliverklee.de
    2. 2. Unittests?
    3. 3. Manual testing is cumbersome
    4. 4. Automatedtesting isfast
    5. 5. Unit tests for the Realty Manager extension
    6. 6. more than1600 tests
    7. 7. in less than 60 seconds
    8. 8. Verify that your codedoes what you expect
    9. 9. Make sure that yourchanges won‘t break anything
    10. 10. Keep other codersfrom breaking your code
    11. 11. Don‘t break anythingeven in complex projects
    12. 12. Create asafety net for refactoring
    13. 13. Green feels good!
    14. 14. Green feels good!
    15. 15. Know your tools
    16. 16. The phpunit extension has it all
    17. 17. The phpunit extension has it allphpunit (TYPO3 extension)
    18. 18. The phpunit extension has it allphpunit (TYPO3 extension) PHPUnit (PEAR package)
    19. 19. The phpunit extension has it allphpunit (TYPO3 extension) PHPUnit (PEAR package) Testrunner (back-end- module)
    20. 20. The phpunit extension has it allphpunit (TYPO3 extension) PHPUnit (PEAR package) Testrunner Testrunner (back-end- module) (CLI module)
    21. 21. The phpunit extension has it allphpunit (TYPO3 extension) PHPUnit (PEAR package) Testing framework for FE & DB Testrunner Testrunner (back-end- module) (CLI module)
    22. 22. Let‘s getsome terms straight
    23. 23. Two testsmeet in a bar ...
    24. 24. Two testsTest meet in a bar ...
    25. 25. Two tests Test meet in aAssertion bar ...
    26. 26. Two tests Test meet in aAssertion bar ... Test Test
    27. 27. Two tests Test meet in aAssertion bar ... Test TestTest case
    28. 28. Two tests Test meet in aAssertion bar ... Test TestTest caseTest case
    29. 29. Two tests Test meet in aAssertion bar ... Test TestTest caseTest caseTest suite
    30. 30. The life cycle unit test of a
    31. 31. The life cycle unit test of a
    32. 32. The life cycle unit test of a new FooTest();
    33. 33. The life cycle unit test of a new FooTest();
    34. 34. The life cycle unit test of a new FooTest(); setUp();
    35. 35. The life cycle unit test of a new FooTest(); setUp(); /** @test */ lifeIsGood();
    36. 36. The life cycle unit test of a new FooTest(); setUp(); /** @test */ lifeIsGood();
    37. 37. The life cycle unit test of a new FooTest(); setUp(); /** @test */ lifeIsGood(); tearDown();
    38. 38. The life cycle unit test of a new FooTest(); setUp(); /** @test */ lifeIsGood(); tearDown();
    39. 39. The life cycle unit test of a new FooTest(); setUp(); /** @test */ lifeIsGood(); tearDown();
    40. 40. Use meaningful unit test names
    41. 41. Use meaningful unit test namesName thebehavior. classCanBeInstantiated
    42. 42. Use meaningful unit test names Name the behavior. classCanBeInstantiatedMention the method. setTitleSetsTitle
    43. 43. Use meaningful unit test names Name the behavior. classCanBeInstantiatedMention the method. setTitleSetsTitle Name the setSizeWithZeroThrowsExceptionpreconditions. hasTitleForEmptyTitleReturnsFalse
    44. 44. Use meaningful unit test names Name the behavior. classCanBeInstantiatedMention the method. setTitleSetsTitle Name the setSizeWithZeroThrowsExceptionpreconditions. hasTitleForEmptyTitleReturnsFalse Dont‘t use "works" or "correctly".
    45. 45. Use meaningful unit test names Name the behavior. classCanBeInstantiatedMention the method. setTitleSetsTitle Name the setSizeWithZeroThrowsExceptionpreconditions. hasTitleForEmptyTitleReturnsFalse Dont‘t use "works" or measureFrubbleWorksCorrectly "correctly".
    46. 46. Use meaningful unit test names Name the behavior. classCanBeInstantiatedMention the method. setTitleSetsTitle Name the setSizeWithZeroThrowsExceptionpreconditions. hasTitleForEmptyTitleReturnsFalse Dont‘t use "works" or measureFrubbleWorksCorrectly "correctly".
    47. 47. Code test-first
    48. 48. Code test-first
    49. 49. Code test-firstwritetest
    50. 50. Code test-firstwritetest
    51. 51. Code test-firstwrite writetest code
    52. 52. Code test-firstwrite writetest code
    53. 53. Code test-firstwrite writetest code
    54. 54. Code test-firstwrite writetest code refactor
    55. 55. Code test-firstwrite writetest code refactor
    56. 56. There are small and huge tests
    57. 57. Unit tests are small and fast
    58. 58. Integration tests test the complete thing
    59. 59. Automated click tests test the interface
    60. 60. Automated click tests test the interface Selenium
    61. 61. Blackbox tests test the public interface
    62. 62. Whitebox tests test the inner workings
    63. 63. The testing framework is created quickly /** * @var Tx_Phpunit_Framework */ protected $testingFramework = NULL; public function setUp() { $this->testingFramework = new Tx_Phpunit_Framework(tx_news2); } public function tearDown() { $this->testingFramework->cleanUp(); unset($this->testingFramework); }
    64. 64. The testing framework is created quickly /** * @var Tx_Phpunit_Framework */ protected $testingFramework = NULL; public function setUp() { $this->testingFramework = new Tx_Phpunit_Framework(tx_news2); } discard the FE, public function tearDown() { delete DB records, $this->testingFramework->cleanUp(); unset($this->testingFramework); delete files }
    65. 65. The testing framework is created quickly /** * @var Tx_Phpunit_Framework */ protected $testingFramework = NULL; public function setUp() { $this->testingFramework = new Tx_Phpunit_Framework(tx_news2); } discard the FE, public function tearDown() { delete DB records, $this->testingFramework->cleanUp(); unset($this->testingFramework); delete files }CREATE TABLE tx_news2_domain_model_news ( … is_dummy_record tinyint(1) unsigned DEFAULT 0 NOT NULL, …
    66. 66. The testing framework can fake almost everything
    67. 67. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array());
    68. 68. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array()); $tf->changeRecord($tableName, $uid, array $recordData);
    69. 69. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array()); $tf->changeRecord($tableName, $uid, array $recordData); $tf->deleteRecord($tableName, $uid);
    70. 70. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array()); $tf->changeRecord($tableName, $uid, array $recordData); $tf->deleteRecord($tableName, $uid); $tf->createRelation($tableName, $uidLocal, $uidForeign, $sorting = 0);
    71. 71. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array()); $tf->changeRecord($tableName, $uid, array $recordData); $tf->deleteRecord($tableName, $uid); $tf->createRelation($tableName, $uidLocal, $uidForeign, $sorting = 0);$tf->createRelationAndUpdateCounter($tableName, $uidLocal, $uidForeign, $columnName);
    72. 72. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array()); $tf->changeRecord($tableName, $uid, array $recordData); $tf->deleteRecord($tableName, $uid); $tf->createRelation($tableName, $uidLocal, $uidForeign, $sorting = 0);$tf->createRelationAndUpdateCounter($tableName, $uidLocal, $uidForeign, $columnName); $tf->removeRelation($tableName, $uidLocal, $uidForeign);
    73. 73. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array()); $tf->changeRecord($tableName, $uid, array $recordData); $tf->deleteRecord($tableName, $uid); $tf->createRelation($tableName, $uidLocal, $uidForeign, $sorting = 0);$tf->createRelationAndUpdateCounter($tableName, $uidLocal, $uidForeign, $columnName); $tf->removeRelation($tableName, $uidLocal, $uidForeign); $numberOfRecords = $tf->countRecords($tableName, $whereClause = );
    74. 74. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array()); $tf->changeRecord($tableName, $uid, array $recordData); $tf->deleteRecord($tableName, $uid); $tf->createRelation($tableName, $uidLocal, $uidForeign, $sorting = 0);$tf->createRelationAndUpdateCounter($tableName, $uidLocal, $uidForeign, $columnName); $tf->removeRelation($tableName, $uidLocal, $uidForeign); $numberOfRecords = $tf->countRecords($tableName, $whereClause = ); $success = $tf->existsRecord($tableName, $whereClause = );
    75. 75. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array()); $tf->changeRecord($tableName, $uid, array $recordData); $tf->deleteRecord($tableName, $uid); $tf->createRelation($tableName, $uidLocal, $uidForeign, $sorting = 0);$tf->createRelationAndUpdateCounter($tableName, $uidLocal, $uidForeign, $columnName); $tf->removeRelation($tableName, $uidLocal, $uidForeign); $numberOfRecords = $tf->countRecords($tableName, $whereClause = ); $success = $tf->existsRecord($tableName, $whereClause = ); $success = $tf->existsExactlyOneRecord($tableName, $whereClause = );
    76. 76. The testing framework can fake almost everything $recordUid = $tf->createRecord($tableName, array $recordData = array()); $tf->changeRecord($tableName, $uid, array $recordData); $tf->deleteRecord($tableName, $uid); $tf->createRelation($tableName, $uidLocal, $uidForeign, $sorting = 0);$tf->createRelationAndUpdateCounter($tableName, $uidLocal, $uidForeign, $columnName); $tf->removeRelation($tableName, $uidLocal, $uidForeign); $numberOfRecords = $tf->countRecords($tableName, $whereClause = ); $success = $tf->existsRecord($tableName, $whereClause = ); $success = $tf->existsExactlyOneRecord($tableName, $whereClause = ); $success = $tf->existsRecordWithUid($tableName, $uid);
    77. 77. The testing framework can fake almost everything
    78. 78. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array());
    79. 79. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array());
    80. 80. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array());
    81. 81. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array()); $tf->createTemplate($pageId, array $recordData = array());
    82. 82. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array()); $tf->createTemplate($pageId, array $recordData = array()); $pageUid = $tf->createFakeFrontEnd($pageUid = 0);
    83. 83. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array()); $tf->createTemplate($pageId, array $recordData = array()); $pageUid = $tf->createFakeFrontEnd($pageUid = 0); $tf->discardFakeFrontEnd();
    84. 84. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array()); $tf->createTemplate($pageId, array $recordData = array()); $pageUid = $tf->createFakeFrontEnd($pageUid = 0); $tf->discardFakeFrontEnd(); $groupUid = $tf->createFrontEndUserGroup(array $recordData = array());
    85. 85. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array()); $tf->createTemplate($pageId, array $recordData = array()); $pageUid = $tf->createFakeFrontEnd($pageUid = 0); $tf->discardFakeFrontEnd(); $groupUid = $tf->createFrontEndUserGroup(array $recordData = array()); $userUid = $tf->createFrontEndUser($groups = , array $recordData = array());
    86. 86. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array()); $tf->createTemplate($pageId, array $recordData = array()); $pageUid = $tf->createFakeFrontEnd($pageUid = 0); $tf->discardFakeFrontEnd(); $groupUid = $tf->createFrontEndUserGroup(array $recordData = array()); $userUid = $tf->createFrontEndUser($groups = , array $recordData = array()); $tf->loginFrontEndUser($userId);
    87. 87. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array()); $tf->createTemplate($pageId, array $recordData = array()); $pageUid = $tf->createFakeFrontEnd($pageUid = 0); $tf->discardFakeFrontEnd(); $groupUid = $tf->createFrontEndUserGroup(array $recordData = array()); $userUid = $tf->createFrontEndUser($groups = , array $recordData = array()); $tf->logoutFrontEndUser(); $tf->loginFrontEndUser($userId);
    88. 88. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array()); $tf->createTemplate($pageId, array $recordData = array()); $pageUid = $tf->createFakeFrontEnd($pageUid = 0); $tf->discardFakeFrontEnd(); $groupUid = $tf->createFrontEndUserGroup(array $recordData = array()); $userUid = $tf->createFrontEndUser($groups = , array $recordData = array()); $tf->logoutFrontEndUser(); $tf->loginFrontEndUser($userId);$userUid = $tf->createAndLoginFrontEndUser($groups = , array $recordData = array());
    89. 89. The testing framework can fake almost everything $pageUid = $tf->createFrontEndPage($parentId = 0, array $recordData = array()); $pageUid = $tf->createSystemFolder($parentId = 0, array $recordData = array()); $elementUid = $tf->createContentElement($pageId = 0, array $recordData = array()); $tf->createTemplate($pageId, array $recordData = array()); $pageUid = $tf->createFakeFrontEnd($pageUid = 0); $tf->discardFakeFrontEnd(); $groupUid = $tf->createFrontEndUserGroup(array $recordData = array()); $userUid = $tf->createFrontEndUser($groups = , array $recordData = array()); $tf->logoutFrontEndUser(); $tf->loginFrontEndUser($userId);$userUid = $tf->createAndLoginFrontEndUser($groups = , array $recordData = array()); $isLoggedIn = $tf->isLoggedIn();
    90. 90. The testing framework can fake almost everything
    91. 91. The testing framework can fake almost everything $recordUid = $tf->createBackEndUser(array $recordData = array());
    92. 92. The testing framework can fake almost everything $recordUid = $tf->createBackEndUser(array $recordData = array()); $recordUid = $tf->createBackEndUserGroup(array $recordData = array());
    93. 93. The testing framework can fake almost everything
    94. 94. The testing framework can fake almost everything $path = $tf->createDummyFile($fileName = test.txt, $content = );
    95. 95. The testing framework can fake almost everything $path = $tf->createDummyFile($fileName = test.txt, $content = );$path = $tf->createDummyZipArchive($fileName = test.zip, array $filesToAdd = array());
    96. 96. The testing framework can fake almost everything $path = $tf->createDummyFile($fileName = test.txt, $content = );$path = $tf->createDummyZipArchive($fileName = test.zip, array $filesToAdd = array()); $tf->deleteDummyFile($fileName);
    97. 97. The testing framework can fake almost everything $path = $tf->createDummyFile($fileName = test.txt, $content = );$path = $tf->createDummyZipArchive($fileName = test.zip, array $filesToAdd = array()); $tf->deleteDummyFile($fileName); $path = $tf->createDummyFolder($folderName);
    98. 98. The testing framework can fake almost everything $path = $tf->createDummyFile($fileName = test.txt, $content = );$path = $tf->createDummyZipArchive($fileName = test.zip, array $filesToAdd = array()); $tf->deleteDummyFile($fileName); $path = $tf->createDummyFolder($folderName); $tf->deleteDummyFolder($folderName);

    ×