Skip to content
Snippets Groups Projects
  1. Mar 15, 2023
  2. Nov 07, 2022
  3. Nov 03, 2022
  4. Sep 21, 2022
  5. Jul 13, 2022
    • Christian Kuhn's avatar
      [TASK] Avoid setUpBackendUserFromFixture() in functionals · f96a47c4
      Christian Kuhn authored
      The testing-framework method setUpBackendUserFromFixture()
      is kinda flawed since it does two things at once: It
      creates db records and creates global state. This is
      unfortunate in various cases, especially when  db
      snapshoting is used. Additionally, it relies on a
      class property which defaults to a fixture file
      delivered by testing-framework in XML format. We
      want to get rid of the .xml fixtures, and we don't
      want that the testing-framework delivers default
      fixtures.
      
      The patch adapts all usages of the property and
      of method setUpBackendUserFromFixture() by splitting
      it into two calls to first insert a local extension
      fixture .csv file and to then call the backend user
      init helper method.
      
      This finishes the removal of .xml fixture uses
      in the core.
      
      $ composer req --dev typo3/testing-framework:dev-main
      
      Change-Id: I32a5c43a6c8176a9e9182d08e08b42b5ff279634
      Resolves: #97928
      Related: #96856
      Releases: main
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75168
      
      
      Tested-by: default avatarBenni Mack <benni@typo3.org>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
      Reviewed-by: default avatarBenni Mack <benni@typo3.org>
      Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
      f96a47c4
  6. Feb 27, 2022
  7. Feb 18, 2022
  8. Jan 25, 2022
  9. Jan 19, 2022
  10. Jan 06, 2022
  11. Nov 12, 2021
  12. Jul 19, 2021
    • Christian Kuhn's avatar
      [TASK] Refactor ViewHelper tests · ad3a216d
      Christian Kuhn authored
      We have a decent test coverage of view helpers, especially
      those within ext:fluid. This is an important asset and we're
      sure all main functionality works.
      
      Most of the tests rely on ViewHelperBaseTestcase from the
      testing framework. This class prepares the main mocking
      of view helper dependencies. Reading the code it becomes
      obvious that this approach is kinda unfortunate: View
      helpers are part of a bigger system - they have some
      general dependencies like the rendering context, the
      request and render children. This leads to a mocking
      party in many unit tests, making the test goal hard to
      understand and follow.
      The mock preparations and assumptions of internal handling
      actively block further separation of concern patches
      within ext:fluid since the ViewHelperBaseTestcase breaks
      all the time.
      
      The patch refactors all unit tests that extend
      ViewHelperBaseTestcase towards functional tests:
      Most of them simply create a StandaloneView, feed a
      template string for the specific view helper and
      string compare the render result. Some FE related VH
      tests additionally set up a full frontend and retrieve
      a rendered fluid view as sub request.
      
      This makes the tests much easier to read, follow and
      understand. The functional tests are now good examples
      to show the various features of single VH's.
      
      Change-Id: I6c5d4eeb0c79ba66a18398a5623a591381a6d707
      Resolves: #94580
      Releases: master
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69857
      
      
      Tested-by: default avatarcore-ci <typo3@b13.com>
      Tested-by: default avatarJochen <rothjochen@gmail.com>
      Tested-by: default avatarBenni Mack <benni@typo3.org>
      Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
      Reviewed-by: default avatarJochen <rothjochen@gmail.com>
      Reviewed-by: default avatarBenni Mack <benni@typo3.org>
      Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
      ad3a216d