PHP Class phpbb_test_case_helpers

显示文件 Open project: phpbb/phpbb Class Usage Examples

Protected Properties

Property Type Description
$expectedTriggerError
$test_case

Public Methods

Method 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 method

public __construct ( $test_case )

copy_dir() public method

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

copy_ext_fixtures() public method

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

empty_dir() public method

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

format_date() public static method

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

get_test_config() public static method

public static get_test_config ( )

makedirs() public method

public makedirs ( $path )

restore_original_ext_dir() public method

This is used to remove the fixtures from the phpBB install

setExpectedTriggerError() public method

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

set_s9e_services() public method

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
return Symfony\Component\DependencyInjection\ContainerInterface

Property Details

$expectedTriggerError protected_oe property

protected $expectedTriggerError

$test_case protected_oe property

protected $test_case