PHP 클래스 phpbb_database_test_connection_manager

파일 보기 프로젝트 열기: phpbb/phpbb 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $config ) Constructor
connect ( boolean $use_db = true ) Creates a PDO connection for the configured database.
database_synchronisation ( array $table_column_map ) : null Performs synchronisations on the database after a fixture has been loaded
get_pdo ( ) Return the current PDO instance
get_tables ( ) : array(string) Retrieves a list of all tables from the database.
load_schema ( $db ) Load the phpBB database schema into the database
post_setup_synchronisation ( PHPUnit_Extensions_Database_DataSet_XmlDataSet $xml_data_set ) : null Performs synchronisations on the database after a fixture has been loaded
purge_extras ( ) Removes extra objects from a database. This is for cases where dropping the database fails.
recreate_db ( ) Drop the database if it exists and re-create it

보호된 메소드들

메소드 설명
ensure_connected ( $method_name ) Throw an exception if not connected
get_dbms_data ( $dbms ) Map a phpBB dbms driver name to dbms data array
load_schema_from_file ( $directory, phpbb\db\driver\driver_interface $db ) Compile the correct schema filename (as per create_schema_files) and load it into the database.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( array $config )
$config array Tests database configuration as returned by phpbb_database_test_case::get_database_config()

connect() 공개 메소드

Creates a PDO connection for the configured database.
public connect ( boolean $use_db = true )
$use_db boolean Whether the DSN should be tied to a particular database making it impossible to delete that database.

database_synchronisation() 공개 메소드

Performs synchronisations on the database after a fixture has been loaded
public database_synchronisation ( array $table_column_map ) : null
$table_column_map array Array of tables/columns to synchronise array(table1 => array(column1, column2))
리턴 null

ensure_connected() 보호된 메소드

Throw an exception if not connected
protected ensure_connected ( $method_name )

get_dbms_data() 보호된 메소드

Map a phpBB dbms driver name to dbms data array
protected get_dbms_data ( $dbms )

get_pdo() 공개 메소드

Return the current PDO instance
public get_pdo ( )

get_tables() 공개 메소드

Retrieves a list of all tables from the database.
public get_tables ( ) : array(string)
리턴 array(string)

load_schema() 공개 메소드

Load the phpBB database schema into the database
public load_schema ( $db )

load_schema_from_file() 보호된 메소드

Compile the correct schema filename (as per create_schema_files) and load it into the database.
protected load_schema_from_file ( $directory, phpbb\db\driver\driver_interface $db )
$db phpbb\db\driver\driver_interface

post_setup_synchronisation() 공개 메소드

Performs synchronisations on the database after a fixture has been loaded
public post_setup_synchronisation ( PHPUnit_Extensions_Database_DataSet_XmlDataSet $xml_data_set ) : null
$xml_data_set PHPUnit_Extensions_Database_DataSet_XmlDataSet Information about the tables contained within the loaded fixture
리턴 null

purge_extras() 공개 메소드

Removes extra objects from a database. This is for cases where dropping the database fails.
public purge_extras ( )

recreate_db() 공개 메소드

Note: This does not load the schema, and it is suggested to re-connect after calling to get use_db isolation.
public recreate_db ( )