‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest:
TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\AbstractTestCase TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait

Public Member Functions

 hierarchicalMenuIsGenerated (string $accessedUrl, array $expectation)
 
 requestsResolvePageIdAndMountPointParameter (string $uri, int $rootPageId, int $expectedPageId, ?string $expectedMountPointParameter)
 
 mountPointPagesShowContentAsConfigured (string $uri, string $expected)
 

Static Public Member Functions

static hierarchicalMenuIsGeneratedDataProvider ()
 
static requestsResolvePageIdAndMountPointParameterDataProvider ()
 
static mountPointPagesShowContentAsConfiguredDataProvider ()
 

Protected Member Functions

 setUp ()
 
- ‪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)
 

Additional Inherited Members

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

Detailed Description

Test case for frontend requests showing menus / links and resolving URLs with MountPoints

The global website defines

  • ‪A products area with the current products
  • ‪Within the products area we want to show the archived products (mountpoint to archived products)
  • ‪An archive page shows all archived information (mountpoint to archive)

The canadian website mirrors the main products area (mountpoint to products), the news and shows a link to the main site.

Same goes to the US website with an other language setup and some minor other pages, but also pages with the same slug.

The archive contains archived products and archived news.

Since links underneath mountpoints can only be reached by default the test suite is validating URLS of menu generation, but also resolving the links to the pages within a Mountpoint.

So we end up with this:

  • ‪Global site has two MountPoint Pages
    • ‪Archived products
      • ‪Speciality: The slug of the archived page is called "/products" - same as the mount point
    • ‪All archived content
      • ‪Speciality: The mounted page only contains a "/" as its a rootpage
  • Canadian site has two MountPoint Pages

    • ‪Products
      • ‪Speciality: Nested mountpoints: Products ("Global") -> Archived Products ("Global Archive")
    • ‪News
      • ‪News of Canada - MountPoint within the same site
      • ‪Archived news - MountPoint to another site
    Todo:

    add Tests for having a PageFolder as mounted page (e.g. id 10000)

    Add tests for multilingual setups

    Add tests with various TypoScript settings activated

Definition at line 62 of file MountPointTest.php.

Member Function Documentation

◆ hierarchicalMenuIsGenerated()

TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::hierarchicalMenuIsGenerated ( string  $accessedUrl,
array  $expectation 
)
Test:
‪@dataProvider hierarchicalMenuIsGeneratedDataProvider

Definition at line 353 of file MountPointTest.php.

◆ hierarchicalMenuIsGeneratedDataProvider()

static TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::hierarchicalMenuIsGeneratedDataProvider ( )
static

Definition at line 119 of file MountPointTest.php.

◆ mountPointPagesShowContentAsConfigured()

TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::mountPointPagesShowContentAsConfigured ( string  $uri,
string  $expected 
)

This test checks for "mount_pid_ol=0", whereas mount_pid_ol=1 should trigger a redirect currently.

Todo:
‪: revisit the "mount_pid_ol=1" redirect, there is some truth to it, but still would remove the context, which does not make sense. Should be revisited. See test above as well.

@dataProvider mountPointPagesShowContentAsConfiguredDataProvider

Test:

Definition at line 452 of file MountPointTest.php.

References TYPO3\CMS\Webhooks\Message\$identifier, and TYPO3\CMS\Webhooks\Message\$record.

◆ mountPointPagesShowContentAsConfiguredDataProvider()

static TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::mountPointPagesShowContentAsConfiguredDataProvider ( )
static

Definition at line 426 of file MountPointTest.php.

◆ requestsResolvePageIdAndMountPointParameter()

TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::requestsResolvePageIdAndMountPointParameter ( string  $uri,
int  $rootPageId,
int  $expectedPageId,
?string  $expectedMountPointParameter 
)
Test:
‪@dataProvider requestsResolvePageIdAndMountPointParameterDataProvider

Definition at line 408 of file MountPointTest.php.

◆ requestsResolvePageIdAndMountPointParameterDataProvider()

static TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::requestsResolvePageIdAndMountPointParameterDataProvider ( )
static

Definition at line 374 of file MountPointTest.php.

◆ setUp()