‪TYPO3CMS  ‪main
TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest Class Reference
Inheritance diagram for TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest:
TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait

Public Member Functions

 theCachingBehavesTheSameForAllFormIntegrationVariants (string $formIdentifier, string $formNamePrefix)
 
 formRendersUncachedIfTheActionTargetIsCalledViaHttpGet (string $formIdentifier)
 
 theHoneypotElementChangesWithEveryCallOfTheFirstFormStep (string $formIdentifier)
 

Static Public Member Functions

static formRendersUncachedIfTheActionTargetIsCalledViaHttpGetDataProvider ()
 
static theHoneypotElementChangesWithEveryCallOfTheFirstFormStepDataProvider ()
 

Public Attributes

 yield
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait
 writeSiteConfiguration (string $identifier, array $site=[], array $languages=[], array $errorHandling=[])
 
 mergeSiteConfiguration (string $identifier, array $overrides)
 
 buildSiteConfiguration (int $rootPageId, string $base='')
 
 buildDefaultLanguageConfiguration (string $identifier, string $base)
 
 buildLanguageConfiguration (string $identifier, string $base, array $fallbackIdentifiers=[], string $fallbackType=null)
 
 buildErrorHandlingConfiguration (string $handler, array $codes)
 
mixed resolveLanguagePreset (string $identifier)
 
 applyInstructions (InternalRequest $request, AbstractInstruction ... $instructions)
 
 mergeInstruction (AbstractInstruction $current, AbstractInstruction $other)
 

Protected Attributes

array $coreExtensionsToLoad = ['form', 'fluid_styled_content']
 
array $testExtensionsToLoad
 
array $configurationToUseInTestInstance
 

Private Member Functions

 getMailSpoolMessages ()
 

Private Attributes

string $databaseScenarioFile = __DIR__ . '/Fixtures/OnePageWithMultipleFormIntegrationsScenario.yaml'
 
const ROOT_PAGE_BASE_URI = 'http://localhost'
 
const LANGUAGE_PRESETS
 
const MAIL_SPOOL_FOLDER = 'typo3temp/var/transient/spool/'
 
array< string, function parseRawHeaders(string $rawMessage):array { $rawParts=explode("\r\n\r\n", $rawMessage, 2); $rawLines=explode("\r\n", $rawParts[0]); $rawHeaders=array_map( fn(string $rawLine)=> array_map( 'trim', explode(':', $rawLine, 2)), $rawLines); return array_combine( array_column( $rawHeaders, 0), array_column( $rawHeaders, 1)); } private function purgeMailSpool():void { foreach(glob( $this->instancePath . '/' . self::MAIL_SPOOL_FOLDER . ' *') as $path) { unlink( $path); } } public static function theCachingBehavesTheSameForAllFormIntegrationVariantsDataProvider():\Generator { yield 'Multistep form/ext:form content element'=> formIdentifier ['formIdentifier'=> 'multistep-test-form-1001', 'formNamePrefix'=> 'tx_form_formframework',]
 

Additional Inherited Members

- ‪Static Protected Member Functions inherited from ‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait
static failIfArrayIsNotEmpty (array $items)
 

Detailed Description

Definition at line 35 of file RequestHandlingTest.php.

Member Function Documentation

◆ formRendersUncachedIfTheActionTargetIsCalledViaHttpGet()

TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::formRendersUncachedIfTheActionTargetIsCalledViaHttpGet ( string  $formIdentifier)

Definition at line 376 of file RequestHandlingTest.php.

◆ formRendersUncachedIfTheActionTargetIsCalledViaHttpGetDataProvider()

static TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::formRendersUncachedIfTheActionTargetIsCalledViaHttpGetDataProvider ( )
static

◆ getMailSpoolMessages()

TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::getMailSpoolMessages ( )
private

◆ setUp()

◆ tearDown()

TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::tearDown ( )
protected

Definition at line 99 of file RequestHandlingTest.php.

◆ theCachingBehavesTheSameForAllFormIntegrationVariants()

TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::theCachingBehavesTheSameForAllFormIntegrationVariants ( string  $formIdentifier,
string  $formNamePrefix 
)

◆ theHoneypotElementChangesWithEveryCallOfTheFirstFormStep()

TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::theHoneypotElementChangesWithEveryCallOfTheFirstFormStep ( string  $formIdentifier)

Definition at line 473 of file RequestHandlingTest.php.

◆ theHoneypotElementChangesWithEveryCallOfTheFirstFormStepDataProvider()

static TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::theHoneypotElementChangesWithEveryCallOfTheFirstFormStepDataProvider ( )
static

Member Data Documentation

◆ $configurationToUseInTestInstance

array TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::$configurationToUseInTestInstance
protected
Initial value:
= [
'MAIL' => [
'defaultMailFromAddress' => 'hello@typo3.org',
'defaultMailFromName' => 'TYPO3',
'transport' => 'mbox',
'transport_spool_type' => 'file',
'transport_spool_filepath' => ‪self::MAIL_SPOOL_FOLDER,
],
'SYS' => [
'caching' => [
'cacheConfigurations' => [
'hash' => [
'backend' => Typo3DatabaseBackend::class,
'frontend' => VariableFrontend::class,
],
'pages' => [
'backend' => Typo3DatabaseBackend::class,
'frontend' => VariableFrontend::class,
],
'rootline' => [
'backend' => Typo3DatabaseBackend::class,
'frontend' => VariableFrontend::class,
],
],
],
'encryptionKey' => '4408d27a916d51e624b69af3554f516dbab61037a9f7b9fd6f81b4d3bedeccb6',
],
]

Definition at line 42 of file RequestHandlingTest.php.

◆ $coreExtensionsToLoad

array TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::$coreExtensionsToLoad = ['form', 'fluid_styled_content']
protected

Definition at line 38 of file RequestHandlingTest.php.

◆ $databaseScenarioFile

string TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::$databaseScenarioFile = __DIR__ . '/Fixtures/OnePageWithMultipleFormIntegrationsScenario.yaml'
private

Definition at line 71 of file RequestHandlingTest.php.

◆ $testExtensionsToLoad

array TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::$testExtensionsToLoad
protected
Initial value:
= [
'typo3/sysext/form/Tests/Functional/RequestHandling/Fixtures/Extensions/form_caching_tests',
]

Definition at line 39 of file RequestHandlingTest.php.

◆ formIdentifier

array<string, function parseRawHeaders(string $rawMessage): array { $rawParts = explode("\r\n\r\n", $rawMessage, 2); $rawLines = explode("\r\n", $rawParts[0]); $rawHeaders = array_map( fn(string $rawLine) => array_map( 'trim', explode(':', $rawLine, 2) ), $rawLines ); return array_combine( array_column($rawHeaders, 0), array_column($rawHeaders, 1) ); } private function purgeMailSpool(): void { foreach (glob($this->instancePath . '/' . self::MAIL_SPOOL_FOLDER . '*') as $path) { unlink($path); } } public static function theCachingBehavesTheSameForAllFormIntegrationVariantsDataProvider(): \Generator { yield 'Multistep form / ext:form content element' => TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::formIdentifier[ 'formIdentifier'=> 'multistep-test-form-1001', 'formNamePrefix'=> 'tx_form_formframework',]
private
Returns
‪array<string, string>

Definition at line 138 of file RequestHandlingTest.php.

◆ LANGUAGE_PRESETS

const TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::LANGUAGE_PRESETS
private
Initial value:
= [
'EN' => ['id' => 0, 'title' => 'English', 'locale' => 'en_GB.UTF8'],
]

Definition at line 73 of file RequestHandlingTest.php.

◆ MAIL_SPOOL_FOLDER

const TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::MAIL_SPOOL_FOLDER = 'typo3temp/var/transient/spool/'
private

Definition at line 76 of file RequestHandlingTest.php.

◆ ROOT_PAGE_BASE_URI

const TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::ROOT_PAGE_BASE_URI = 'http://localhost'
private

Definition at line 72 of file RequestHandlingTest.php.

◆ yield

TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest::yield
‪TYPO3\CMS\Form\Tests\Functional\RequestHandling\RequestHandlingTest\MAIL_SPOOL_FOLDER
‪const MAIL_SPOOL_FOLDER
Definition: RequestHandlingTest.php:76