Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 13.4] [BUGFIX] Fix wrong literalincludes for FunctionalTesting chapter #5156

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Documentation/Testing/FunctionalTesting/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ Apart from that default list, it is possible to load additional Core extensions:
that wants to test if it works well together with workspaces, would for example specify
the workspaces extension as additional to-load extension:

.. literalinclude:: _FunctionalTests/_GeneratorTest.php
.. literalinclude:: _FunctionalTests/_SomeTest.php
:language: php
:caption: EXT:my_extension/Tests/Functional/SomeTest.php

Furthermore, third party extensions and fixture extensions can be loaded for
any given test case:

.. literalinclude:: _FunctionalTests/_GeneratorTest.php
.. literalinclude:: _FunctionalTests/_SomeTestExtensions.php
:language: php
:caption: EXT:my_extension/Tests/Functional/SomeTest.php
:caption: EXT:my_extension/Tests/Functional/SomeTestExtensions.php

In this case the fictional extension `some_extension` comes with an own fixture extension that should
be loaded, and another `base_extension` should be loaded. These extensions will be linked into
Expand Down Expand Up @@ -115,9 +115,9 @@ and one `tt_content` row. So one `.csv` file can contain rows of multiple tables
In general, the methods need the absolute path to the fixture file to load them. However some
keywords are allowed:

.. literalinclude:: _FunctionalTests/_GeneratorTest.php
.. literalinclude:: _FunctionalTests/_SomeTestImportDataSet.php
:language: php
:caption: EXT:some_extension/Tests/Functional/SomeTest.php
:caption: EXT:some_extension/Tests/Functional/SomeTestImportDataSet.php

.. _testing-writing-functional-assert-database:

Expand All @@ -141,9 +141,9 @@ If the system under test works on files, those can be provided by the test setup
example, one may want to check if an image has been properly sized down. The image to work
on can be linked into the test instance:

.. literalinclude:: _FunctionalTests/_GeneratorTest.php
.. literalinclude:: _FunctionalTests/_SomeTestFiles.php
:language: php
:caption: EXT:my_extension/Tests/Functional/SomeTest.php
:caption: EXT:my_extension/Tests/Functional/SomeTestFiles.php

It is also possible to *copy* the files to the test instance instead of only linking it
using :php:`$pathsToProvideInTestInstance`.
Expand All @@ -161,7 +161,7 @@ If extensions need additional settings in :file:`config/system/settings.php`, th

.. literalinclude:: _FunctionalTests/_SomeTestConfiguration.php
:language: php
:caption: EXT:my_extension/Tests/Functional/SomeTest.php
:caption: EXT:my_extension/Tests/Functional/SomeTestConfiguration.php

.. _testing-writing-functional-frontend:

Expand All @@ -173,7 +173,7 @@ To prepare a frontend test, the system can be instructed to load a set of

.. literalinclude:: _FunctionalTests/_SomeTestFrontend.php
:language: php
:caption: EXT:my_extension/Tests/Functional/SomeTest.php
:caption: EXT:my_extension/Tests/Functional/SomeTestFrontend.php

This instructs the system to load the :file:`Basic.typoscript` as TypoScript
file for the frontend page with uid 1.
Expand Down