PHP Class phpbb_test_case_helpers

Afficher le fichier Open project: phpbb/phpbb Class Usage Examples

Protected Properties

Свойство Type Description
$expectedTriggerError
$test_case

Méthodes publiques

Méthode Description
__construct ( $test_case )
copy_dir ( string $source, string $dest ) : array Recursive directory copying function
copy_ext_fixtures ( $fixtures_dir, $fixtures ) This should only be called once before the tests are run.
empty_dir ( $path ) Empty directory (remove any subdirectories/files below)
format_date ( integer $gmepoch ) : string Mocked replacement for \phpbb\user::format_date()
get_test_config ( )
makedirs ( $path )
restore_original_ext_dir ( ) This should only be called once after the tests are run.
setExpectedTriggerError ( $errno, $message = '' )
set_s9e_services ( Symfony\Component\DependencyInjection\ContainerInterface $container = null, string $fixture = null, string $styles_path = null ) : Symfony\Component\DependencyInjection\ContainerInterface Set working instances of the text_formatter.* services

Method Details

__construct() public méthode

public __construct ( $test_case )

copy_dir() public méthode

Recursive directory copying function
public copy_dir ( string $source, string $dest ) : array
$source string
$dest string
Résultat array list of files copied

copy_ext_fixtures() public méthode

This is used to copy the fixtures to the phpBB install
public copy_ext_fixtures ( $fixtures_dir, $fixtures )

empty_dir() public méthode

Empty directory (remove any subdirectories/files below)
public empty_dir ( $path )

format_date() public static méthode

Mocked replacement for \phpbb\user::format_date()
public static format_date ( integer $gmepoch ) : string
$gmepoch integer unix timestamp
Résultat string

get_test_config() public static méthode

public static get_test_config ( )

makedirs() public méthode

public makedirs ( $path )

restore_original_ext_dir() public méthode

This is used to remove the fixtures from the phpBB install

setExpectedTriggerError() public méthode

public setExpectedTriggerError ( $errno, $message = '' )

set_s9e_services() public méthode

If no container is passed, the global $phpbb_container will be used and/or created if applicable
public set_s9e_services ( Symfony\Component\DependencyInjection\ContainerInterface $container = null, string $fixture = null, string $styles_path = null ) : Symfony\Component\DependencyInjection\ContainerInterface
$container Symfony\Component\DependencyInjection\ContainerInterface Service container
$fixture string Path to the XML fixture
$styles_path string Path to the styles dir
Résultat Symfony\Component\DependencyInjection\ContainerInterface

Property Details

$expectedTriggerError protected_oe property

protected $expectedTriggerError

$test_case protected_oe property

protected $test_case