Property | Type | Description | |
---|---|---|---|
$already_installed | |||
$cache | |||
$client | |||
$client | |||
$config | |||
$cookieJar | |||
$db | |||
$extension_manager | |||
$install_success | |||
$lang | array | Language array used by phpBB | |
$last_post_timestamp | |||
$root_url | |||
$sid | string | Session ID for current test's session (each test makes its own) |
Method | Description | |
---|---|---|
__construct ( $name = NULL, array $data = [], $dataName = '' ) | ||
assertContainsLang ( string $needle, string $haystack, string $message = null ) | assertContains for language strings | |
assertNotContainsLang ( string $needle, string $haystack, string $message = null ) | assertNotContains for language strings | |
assert_checkbox_is_checked ( Symfony\Component\DomCrawler\Crawler $crawler, string $name, string $message = '' ) : null | Asserts that exactly one checkbox with name $name exists within the scope of $crawler and that the checkbox is checked. | |
assert_checkbox_is_unchecked ( Symfony\Component\DomCrawler\Crawler $crawler, string $name, string $message = '' ) : null | Asserts that exactly one checkbox with name $name exists within the scope of $crawler and that the checkbox is unchecked. | |
assert_filter ( $crawler, $expr, $msg = null ) | ||
assert_find_one_checkbox ( Symfony\Component\DomCrawler\Crawler $crawler, string $name, string $message = '' ) : Symfony\Component\DomCrawler\Crawler | Searches for an input element of type checkbox with the name $name using $crawler. Contains an assertion that only one such checkbox exists within the scope of $crawler. | |
assert_response_html ( $status_code = 200 ) | * Perform some basic assertions for the page | |
assert_response_status_code ( integer $status_code = 200 ) : null | Heuristic function to check that the response is success. | |
assert_response_xml ( $status_code = 200 ) | * Perform some basic assertions for an xml page | |
create_post ( integer $forum_id, integer $topic_id, string $subject, string $message, array $additional_form_data = [], string $expected = '' ) : array | null | Creates a post | |
create_private_message ( string $subject, string $message, array $to, array $additional_form_data = [] ) : integer | Creates a private message | |
create_topic ( integer $forum_id, string $subject, string $message, array $additional_form_data = [], string $expected = '' ) : array | null | Creates a topic | |
delete_post ( integer $forum_id, $post_id ) : null | Deletes a post | |
delete_topic ( integer $topic_id ) : null | Deletes a topic | |
get_content ( ) : string | Get Client Content | |
get_parameter_from_link ( string $url, string $parameter ) : string | Returns the requested parameter from a URL | |
get_passwords_manager ( ) : phpbb\passwords\manager | Return a passwords manager instance | |
get_quickmod_page ( integer $topic_id, string $action, $crawler = false ) : Symfony\Component\DomCrawler\Crawler | Get quickmod page | |
install_ext ( $extension ) | ||
request ( string $method, string $path, array $form_data = [], boolean $assert_response_html = true ) : Symfony\Component\DomCrawler\Crawler | Perform a request to page | |
setUp ( ) | ||
setUpBeforeClass ( ) | ||
submit ( Symfony\Component\DomCrawler\Form $form, array $values = [], boolean $assert_response_html = true ) : Symfony\Component\DomCrawler\Crawler | Submits a form |
Method | Description | |
---|---|---|
add_lang ( $lang_file ) | ||
add_lang_ext ( $ext_name, $lang_file ) | ||
add_style ( string $style_id, string $style_path, string $parent_style_id = 1, string $parent_style_path = 'prosilver' ) | Creates a new style | |
add_user_group ( $group_name, $usernames, $default = false, $leader = false ) | ||
admin_login ( $username = 'admin' ) | Login to the ACP You must run login() before calling this. | |
bootstrap ( ) | test cases can override this | |
create_user ( string $username ) : integer | Creates a new user with limited permissions | |
delete_style ( string $style_id, string $style_path ) | Remove temporary style created by add_style() | |
get_cache_driver ( ) | ||
get_db ( ) | ||
get_extension_manager ( ) | ||
install_board ( ) | ||
lang ( ) | ||
login ( $username = 'admin' ) | ||
logout ( ) | ||
purge_cache ( ) | ||
remove_user_group ( $group_name, $usernames ) | ||
setup_extensions ( ) : array | ||
submit_message ( string $posting_url, string $posting_contains, array $form_data ) : |
Helper for submitting a message (post or private message) | |
submit_post ( string $posting_url, string $posting_contains, array $form_data, string $expected = '' ) : array | null | Helper for submitting posts | |
tearDown ( ) |
Method | Description | |
---|---|---|
recreate_database ( $config ) |
public __construct ( $name = NULL, array $data = [], $dataName = '' ) | ||
$data | array |
protected add_style ( string $style_id, string $style_path, string $parent_style_id = 1, string $parent_style_path = 'prosilver' ) | ||
$style_id | string | Style ID |
$style_path | string | Style directory |
$parent_style_id | string | Parent style id. Default = 1 |
$parent_style_path | string | Parent style directory. Default = 'prosilver' |
protected add_user_group ( $group_name, $usernames, $default = false, $leader = false ) |
protected admin_login ( $username = 'admin' ) |
public assert_find_one_checkbox ( Symfony\Component\DomCrawler\Crawler $crawler, string $name, string $message = '' ) : Symfony\Component\DomCrawler\Crawler | ||
$crawler | Symfony\Component\DomCrawler\Crawler | |
$name | string | |
$message | string | |
return | Symfony\Component\DomCrawler\Crawler |
public static assert_response_html ( $status_code = 200 ) | ||
$status_code | Expected status code, false to disable check |
public static assert_response_status_code ( integer $status_code = 200 ) : null | ||
$status_code | integer | Expected status code |
return | null |
public static assert_response_xml ( $status_code = 200 ) | ||
$status_code | Expected status code, false to disable check |
public create_post ( integer $forum_id, integer $topic_id, string $subject, string $message, array $additional_form_data = [], string $expected = '' ) : array | null | ||
$forum_id | integer | |
$topic_id | integer | |
$subject | string | |
$message | string | |
$additional_form_data | array | Any additional form data to be sent in the request |
$expected | string | Lang var of expected message after posting |
return | array | null | post_id, topic_id if message is empty |
public create_topic ( integer $forum_id, string $subject, string $message, array $additional_form_data = [], string $expected = '' ) : array | null | ||
$forum_id | integer | |
$subject | string | |
$message | string | |
$additional_form_data | array | Any additional form data to be sent in the request |
$expected | string | Lang var of expected message after posting |
return | array | null | post_id, topic_id if message is empty |
protected create_user ( string $username ) : integer | ||
$username | string | Also doubles up as the user's password |
return | integer | ID of created user |
public delete_post ( integer $forum_id, $post_id ) : null | ||
$forum_id | integer | |
return | null |
protected delete_style ( string $style_id, string $style_path ) | ||
$style_id | string | Style ID |
$style_path | string | Style directory |
public delete_topic ( integer $topic_id ) : null | ||
$topic_id | integer | |
return | null |
public static get_content ( ) : string | ||
return | string | HTML page |
public get_passwords_manager ( ) : phpbb\passwords\manager | ||
return | phpbb\passwords\manager |
public get_quickmod_page ( integer $topic_id, string $action, $crawler = false ) : Symfony\Component\DomCrawler\Crawler | ||
$topic_id | integer | |
$action | string | Language key for the quickmod action |
return | Symfony\Component\DomCrawler\Crawler |
public static request ( string $method, string $path, array $form_data = [], boolean $assert_response_html = true ) : Symfony\Component\DomCrawler\Crawler | ||
$method | string | HTTP Method |
$path | string | Page path, relative from phpBB root path |
$form_data | array | An array of form field values |
$assert_response_html | boolean | Should we perform standard assertions for a normal html page |
return | Symfony\Component\DomCrawler\Crawler |
protected static setup_extensions ( ) : array | ||
return | array | List of extensions that should be set up |
public static submit ( Symfony\Component\DomCrawler\Form $form, array $values = [], boolean $assert_response_html = true ) : Symfony\Component\DomCrawler\Crawler | ||
$form | Symfony\Component\DomCrawler\Form | A Form instance |
$values | array | An array of form field values |
$assert_response_html | boolean | Should we perform standard assertions for a normal html page |
return | Symfony\Component\DomCrawler\Crawler |
protected submit_post ( string $posting_url, string $posting_contains, array $form_data, string $expected = '' ) : array | null | ||
$posting_url | string | |
$posting_contains | string | |
$form_data | array | |
$expected | string | Lang var of expected message after posting |
return | array | null | post_id, topic_id if message is empty |
protected string $sid | ||
return | string |