‪TYPO3CMS  9.5
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

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

Static Public Member Functions

static setUpBeforeClass ()
 
static tearDownAfterClass ()
 

Protected Member Functions

 setUp ()
 
 setUpDatabase ()
 
 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)
 
array buildSiteConfiguration (int $rootPageId, string $base='')
 
array buildDefaultLanguageConfiguration (string $identifier, string $base)
 
array buildLanguageConfiguration (string $identifier, string $base, array $fallbackIdentifiers=[], string $fallbackType=null)
 
array buildErrorHandlingConfiguration (string $handler, array $codes)
 
mixed resolveLanguagePreset (string $identifier)
 
InternalRequest applyInstructions (InternalRequest $request, AbstractInstruction ... $instructions)
 
AbstractInstruction mergeInstruction (AbstractInstruction $current, AbstractInstruction $other)
 

Private Attributes

string $siteTitle = 'A Company that Manufactures Board Games and Everything Inc'
 
InternalRequestContext $internalRequestContext
 

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 ENCRYPTION_KEY = '4408d27a916d51e624b69af3554f516dbab61037a9f7b9fd6f81b4d3bedeccb6'
 

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 61 of file MountPointTest.php.

Member Function Documentation

◆ hierarchicalMenuIsGenerated()

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

Definition at line 432 of file MountPointTest.php.

◆ hierarchicalMenuIsGeneratedDataProvider()

array TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::hierarchicalMenuIsGeneratedDataProvider ( )
Returns
‪array

Definition at line 195 of file MountPointTest.php.

◆ mountPointPagesShowContentAsConfigured()

TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::mountPointPagesShowContentAsConfigured ( string  $uri,
string  $expected 
)
Parameters
string$uri
string$expected‪@dataProvider mountPointPagesShowContentAsConfiguredDataProvider
Test:
‪@group not-postgres Does not work on postres currenly due to setUpFrontendRootPage which does not work with the database snapshotting

Definition at line 543 of file MountPointTest.php.

◆ mountPointPagesShowContentAsConfiguredDataProvider()

array TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::mountPointPagesShowContentAsConfiguredDataProvider ( )
Returns
‪array

Definition at line 517 of file MountPointTest.php.

◆ requestsResolvePageIdAndMountPointParameter()

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

Definition at line 492 of file MountPointTest.php.

◆ requestsResolvePageIdAndMountPointParameterDataProvider()

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

Definition at line 454 of file MountPointTest.php.

◆ setUp()

◆ setUpBeforeClass()

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

Definition at line 71 of file MountPointTest.php.

◆ setUpDatabase()

TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::setUpDatabase ( )
protected

◆ tearDown()

TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::tearDown ( )
protected

Definition at line 186 of file MountPointTest.php.

◆ tearDownAfterClass()

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

Definition at line 77 of file MountPointTest.php.

Member Data Documentation

◆ $internalRequestContext

InternalRequestContext TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::$internalRequestContext
private

Definition at line 69 of file MountPointTest.php.

◆ $siteTitle

string TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\MountPointTest::$siteTitle = 'A Company that Manufactures Board Games and Everything Inc'
private

Definition at line 65 of file MountPointTest.php.