TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Build\FunctionalTestsBootstrap Class Reference

Public Member Functions

 bootstrapSystem ()
 

Protected Member Functions

 enableDisplayErrors ()
 
 loadClassFiles ()
 
 createNecessaryDirectoriesInDocumentRoot ()
 
 createDirectory ($directory)
 
 getWebRoot ()
 
 exitWithMessage ($message)
 

Detailed Description

This file is defined in FunctionalTests.xml and called by phpunit before instantiating the test suites, it must also be included with phpunit parameter –bootstrap if executing single test case classes.

Definition at line 24 of file FunctionalTestsBootstrap.php.

Member Function Documentation

◆ bootstrapSystem()

TYPO3\CMS\Core\Build\FunctionalTestsBootstrap::bootstrapSystem ( )

Bootstraps the system for unit tests.

Returns
void

Definition at line 31 of file FunctionalTestsBootstrap.php.

References TYPO3\CMS\Core\Build\FunctionalTestsBootstrap\enableDisplayErrors().

◆ createDirectory()

TYPO3\CMS\Core\Build\FunctionalTestsBootstrap::createDirectory (   $directory)
protected

Creates the directory $directory (recursively if required).

If $directory already exists, this method is a no-op.

Parameters
string$directoryabsolute path of the directory to be created
Returns
void
Exceptions

Definition at line 113 of file FunctionalTestsBootstrap.php.

Referenced by TYPO3\CMS\Core\Build\FunctionalTestsBootstrap\createNecessaryDirectoriesInDocumentRoot().

◆ createNecessaryDirectoriesInDocumentRoot()

TYPO3\CMS\Core\Build\FunctionalTestsBootstrap::createNecessaryDirectoriesInDocumentRoot ( )
protected

Creates the following directories in the TYPO3 core:

  • typo3temp
Returns
FunctionalTestsBootstrap fluent interface

Definition at line 97 of file FunctionalTestsBootstrap.php.

References TYPO3\CMS\Core\Build\FunctionalTestsBootstrap\createDirectory().

◆ enableDisplayErrors()

TYPO3\CMS\Core\Build\FunctionalTestsBootstrap::enableDisplayErrors ( )
protected

Makes sure error messages during the tests get displayed no matter what is set in php.ini.

Returns
FunctionalTestsBootstrap fluent interface

Definition at line 44 of file FunctionalTestsBootstrap.php.

Referenced by TYPO3\CMS\Core\Build\FunctionalTestsBootstrap\bootstrapSystem().

◆ exitWithMessage()

TYPO3\CMS\Core\Build\FunctionalTestsBootstrap::exitWithMessage (   $message)
protected

Echo out a text message and exit with error code

Parameters
string$message

Definition at line 145 of file FunctionalTestsBootstrap.php.

Referenced by TYPO3\CMS\Core\Build\FunctionalTestsBootstrap\loadClassFiles().

◆ getWebRoot()

TYPO3\CMS\Core\Build\FunctionalTestsBootstrap::getWebRoot ( )
protected

Returns the absolute path the TYPO3 document root.

Returns
string the TYPO3 document root using Unix path separators

Definition at line 130 of file FunctionalTestsBootstrap.php.

Referenced by TYPO3\CMS\Core\Build\FunctionalTestsBootstrap\loadClassFiles().

◆ loadClassFiles()

TYPO3\CMS\Core\Build\FunctionalTestsBootstrap::loadClassFiles ( )
protected

Requires classes the functional test classes extend from or use for further bootstrap. Only files required for "new TestCaseClass" are required here and a general exception that is thrown by setUp() code.

Returns
FunctionalTestsBootstrap fluent interface

Definition at line 57 of file FunctionalTestsBootstrap.php.

References TYPO3\CMS\Core\Build\FunctionalTestsBootstrap\exitWithMessage(), and TYPO3\CMS\Core\Build\FunctionalTestsBootstrap\getWebRoot().