mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 11:58:51 +00:00
[ticket/17514] Replace phpBB3 with phpBB in tests
PHPBB-17514
This commit is contained in:
parent
7fe8188b78
commit
5d3f0cd482
9 changed files with 32 additions and 32 deletions
|
@ -165,7 +165,7 @@ phpBB allows you to write such tests.
|
|||
Running
|
||||
-------
|
||||
|
||||
Running the tests requires your phpBB3 repository to be accessible through a
|
||||
Running the tests requires your phpBB repository to be accessible through a
|
||||
local web server. You will need to supply the URL to the webserver in
|
||||
the 'tests/test_config.php' file. This is as simple as defining the
|
||||
'$phpbb_functional_url' variable, which contains the URL for the directory containing
|
||||
|
@ -173,7 +173,7 @@ the board. Make sure you include the trailing slash. Note that without extensive
|
|||
changes to the test framework, you cannot use a board outside of the repository
|
||||
on which to run tests.
|
||||
|
||||
$phpbb_functional_url = 'http://localhost/phpBB3/';
|
||||
$phpbb_functional_url = 'http://localhost/phpBB/';
|
||||
|
||||
Functional tests are automatically run, if '$phpbb_functional_url' is configured.
|
||||
If you only want the functional tests, run:
|
||||
|
|
|
@ -22,12 +22,12 @@ class phpbb_controller_helper_route_slash_test extends phpbb_controller_common_h
|
|||
|
||||
protected function get_uri()
|
||||
{
|
||||
return '/phpBB3/app.php';
|
||||
return '/phpBB/app.php';
|
||||
}
|
||||
|
||||
protected function get_base_uri()
|
||||
{
|
||||
return '/phpBB3/';
|
||||
return '/phpBB/';
|
||||
}
|
||||
|
||||
protected function get_script_name()
|
||||
|
@ -37,6 +37,6 @@ class phpbb_controller_helper_route_slash_test extends phpbb_controller_common_h
|
|||
|
||||
protected function path_to_app()
|
||||
{
|
||||
return 'phpBB3/';
|
||||
return 'phpBB/';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -352,11 +352,11 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
|
|||
array(
|
||||
"\t/**",
|
||||
"\t*/",
|
||||
"\t\$vars = array('_Strange123', 'phpBB3_Test');",
|
||||
"\t\$vars = array('_Strange123', 'phpBB_Test');",
|
||||
"\t\$this->dispatcher->dispatch('test');",
|
||||
),
|
||||
3,
|
||||
array('_Strange123', 'phpBB3_Test'),
|
||||
array('_Strange123', 'phpBB_Test'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case
|
|||
$this->login('notificationtestuser');
|
||||
|
||||
// Post a new post that needs approval
|
||||
$this->create_post(2, 1, 'Re: Welcome to phpBB3', 'This is a test [b]post[/b] posted by notificationtestuser.', array(), 'POST_STORED_MOD');
|
||||
$this->create_post(2, 1, 'Re: Welcome to phpBB', 'This is a test [b]post[/b] posted by notificationtestuser.', array(), 'POST_STORED_MOD');
|
||||
$crawler = self::request('GET', "viewtopic.php?t=1&sid={$this->sid}");
|
||||
$this->assertStringNotContainsString('This is a test post posted by notificationtestuser.', $crawler->filter('html')->text());
|
||||
|
||||
|
|
|
@ -193,13 +193,13 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
|
|||
|
||||
foreach (['', 'a', 't', 'f', 'i', 's'] as $sort_key)
|
||||
{
|
||||
$this->assert_search_found('phpbb3+installation', 1, 4, $sort_key);
|
||||
$this->assert_search_found('phpbb+installation', 1, 4, $sort_key);
|
||||
$this->assert_search_found('foosubject+barsearch', 1, 2, $sort_key);
|
||||
$this->assert_search_found('barsearch-testing', 1, 2, $sort_key); // test hyphen ignored
|
||||
$this->assert_search_found('barsearch+-+testing', 1, 2, $sort_key); // test hyphen wrapped with space ignored
|
||||
$this->assert_search_found('multiple+results+count', 3, 15, $sort_key); // test multiple results count - posts
|
||||
$this->assert_search_found_topics('multiple+results+count', 2, $sort_key); // test multiple results count - topics
|
||||
$this->assert_search_found_topics('phpbb3+installation', 1, $sort_key);
|
||||
$this->assert_search_found_topics('phpbb+installation', 1, $sort_key);
|
||||
$this->assert_search_found_topics('foosubject+barsearch', 1, $sort_key);
|
||||
|
||||
$this->assert_search_in_forum(2, 'multiple+search+results', 3, $sort_key); // test multiple results count - forum search - posts
|
||||
|
|
|
@ -141,22 +141,22 @@ class phpbb_path_helper_test extends phpbb_test_case
|
|||
array(
|
||||
$this->phpbb_root_path . 'test.php',
|
||||
'/foo/template',
|
||||
'/phpbb3-fork/phpBB/app.php/foo/template',
|
||||
'/phpbb3-fork/phpBB/app.php',
|
||||
'/phpbb-fork/phpBB/app.php/foo/template',
|
||||
'/phpbb-fork/phpBB/app.php',
|
||||
'./../../',
|
||||
),
|
||||
array(
|
||||
$this->phpbb_root_path . 'test.php',
|
||||
'/foo/template',
|
||||
'/phpbb3-fork/phpBB/foo/template',
|
||||
'/phpbb3-fork/phpBB/app.php',
|
||||
'/phpbb-fork/phpBB/foo/template',
|
||||
'/phpbb-fork/phpBB/app.php',
|
||||
'./../',
|
||||
),
|
||||
array(
|
||||
$this->phpbb_root_path . 'test.php',
|
||||
'/',
|
||||
'/phpbb3-fork/phpBB/app.php/',
|
||||
'/phpbb3-fork/phpBB/app.php',
|
||||
'/phpbb-fork/phpBB/app.php/',
|
||||
'/phpbb-fork/phpBB/app.php',
|
||||
'./../',
|
||||
),
|
||||
|
||||
|
@ -171,29 +171,29 @@ class phpbb_path_helper_test extends phpbb_test_case
|
|||
array(
|
||||
'./../../' . $this->phpbb_root_path . 'test.php',
|
||||
'/foo/template',
|
||||
'/phpbb3-fork/phpBB/app.php/foo/template',
|
||||
'/phpbb3-fork/phpBB/app.php',
|
||||
'/phpbb-fork/phpBB/app.php/foo/template',
|
||||
'/phpbb-fork/phpBB/app.php',
|
||||
'',
|
||||
),
|
||||
array(
|
||||
'./../' . $this->phpbb_root_path . 'test.php',
|
||||
'/foo/template',
|
||||
'/phpbb3-fork/phpBB/foo/template',
|
||||
'/phpbb3-fork/phpBB/app.php',
|
||||
'/phpbb-fork/phpBB/foo/template',
|
||||
'/phpbb-fork/phpBB/app.php',
|
||||
'',
|
||||
),
|
||||
array(
|
||||
'./../'.$this->phpbb_root_path . 'test.php',
|
||||
'/',
|
||||
'/phpbb3-fork/phpBB/app.php/',
|
||||
'/phpbb3-fork/phpBB/app.php',
|
||||
'/phpbb-fork/phpBB/app.php/',
|
||||
'/phpbb-fork/phpBB/app.php',
|
||||
'',
|
||||
),
|
||||
array(
|
||||
'./../'.$this->phpbb_root_path . 'test.php',
|
||||
'',
|
||||
'/phpbb3-fork/phpBB/foo',
|
||||
'/phpbb3-fork/phpBB/app.php',
|
||||
'/phpbb-fork/phpBB/foo',
|
||||
'/phpbb-fork/phpBB/app.php',
|
||||
'',
|
||||
),
|
||||
);
|
||||
|
|
|
@ -17,7 +17,7 @@ class phpbb_regex_table_prefix_test extends phpbb_test_case
|
|||
{
|
||||
return array(
|
||||
array('phpbb_', 1),
|
||||
array('phpBB3', 1),
|
||||
array('phpBB', 1),
|
||||
array('a', 1),
|
||||
|
||||
array('', 0),
|
||||
|
|
|
@ -227,7 +227,7 @@ class test_ucp_controller_webpush_test extends phpbb_database_test_case
|
|||
$this->assertEquals([
|
||||
'heading' => 'yourdomain.com',
|
||||
'title' => 'Quoted by Guest in:',
|
||||
'text' => '"Welcome to phpBB3"',
|
||||
'text' => '"Welcome to phpBB"',
|
||||
'url' => 'phpBB/viewtopic.php?p=1#p1',
|
||||
'avatar' => [],
|
||||
], $response_data);
|
||||
|
@ -285,7 +285,7 @@ class test_ucp_controller_webpush_test extends phpbb_database_test_case
|
|||
$this->assertEquals([
|
||||
'heading' => 'yourdomain.com',
|
||||
'title' => 'Quoted by Guest in:',
|
||||
'text' => '"Welcome to phpBB3"',
|
||||
'text' => '"Welcome to phpBB"',
|
||||
'url' => 'phpBB/viewtopic.php?p=1#p1',
|
||||
'avatar' => [],
|
||||
], $response_data);
|
||||
|
@ -393,7 +393,7 @@ class test_ucp_controller_webpush_test extends phpbb_database_test_case
|
|||
$this->assertEquals([
|
||||
'heading' => 'yourdomain.com',
|
||||
'title' => 'Quoted by Guest in:',
|
||||
'text' => '"Welcome to phpBB3"',
|
||||
'text' => '"Welcome to phpBB"',
|
||||
'url' => 'phpBB/viewtopic.php?p=1#p1',
|
||||
'avatar' => [],
|
||||
], $response_data);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<column>notification_time</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value><![CDATA[{"item_id":1,"notification_type_id":4,"item_parent_id":1,"notification_time":1738437884,"notification_read":false,"notification_data":"a:6:{s:9:\"poster_id\";i:3;s:11:\"topic_title\";s:17:\"Welcome to phpBB3\";s:12:\"post_subject\";s:21:\"Re: Welcome to phpBB3\";s:13:\"post_username\";s:0:\"\";s:8:\"forum_id\";i:2;s:10:\"forum_name\";s:16:\"Your first forum\";}","user_id":2,"notification_type_name":"notification.type.quote"}]]></value>
|
||||
<value><![CDATA[{"item_id":1,"notification_type_id":4,"item_parent_id":1,"notification_time":1738437884,"notification_read":false,"notification_data":"a:6:{s:9:\"poster_id\";i:3;s:11:\"topic_title\";s:16:\"Welcome to phpBB\";s:12:\"post_subject\";s:20:\"Re: Welcome to phpBB\";s:13:\"post_username\";s:0:\"\";s:8:\"forum_id\";i:2;s:10:\"forum_name\";s:16:\"Your first forum\";}","user_id":2,"notification_type_name":"notification.type.quote"}]]></value>
|
||||
<value>488c17afe4f18714c235b395e21b78df1c3d78bf1e13d0633ed9425d2eebf967</value>
|
||||
<value>2</value>
|
||||
<value>4</value>
|
||||
|
@ -17,7 +17,7 @@
|
|||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value><![CDATA[{"heading":"yourdomain.com","title":"Quoted by Guest in:","text":"\"Welcome to phpBB3\"","url":"phpBB\/viewtopic.php?p=1#p1","avatar":[]}]]></value>
|
||||
<value><![CDATA[{"heading":"yourdomain.com","title":"Quoted by Guest in:","text":"\"Welcome to phpBB\"","url":"phpBB\/viewtopic.php?p=1#p1","avatar":[]}]]></value>
|
||||
<value>488c17afe4f18714c235b395e21b78df1c3d78bf1e13d0633ed9425d2eebf967</value>
|
||||
<value>2</value>
|
||||
<value>4</value>
|
||||
|
|
Loading…
Add table
Reference in a new issue