aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/RUNNING_TESTS.md14
-rw-r--r--tests/acp_board/select_auth_method_test.php4
-rw-r--r--tests/controller/controller_test.php2
-rw-r--r--tests/functional/extension_acp_test.php4
-rw-r--r--tests/functional/visibility_reapprove_test.php3
5 files changed, 15 insertions, 12 deletions
diff --git a/tests/RUNNING_TESTS.md b/tests/RUNNING_TESTS.md
index 0778046141..d638c86859 100644
--- a/tests/RUNNING_TESTS.md
+++ b/tests/RUNNING_TESTS.md
@@ -128,12 +128,16 @@ Slow tests
--------------
Certain tests, such as the UTF-8 normalizer or the DNS tests tend to be slow.
-Thus these tests are in the `slow` group, which is excluded by default. You can
-enable slow tests by copying the phpunit.xml.all file to phpunit.xml. If you
+Thus these tests are in the `slow` group, which is excluded by default. If you
only want the slow tests, run:
$ phpBB/vendor/bin/phpunit --group slow
+If you want all tests, run:
+
+ $ phpBB/vendor/bin/phpunit --group __nogroup__,functional,slow
+
+
Functional tests
-----------------
@@ -154,10 +158,10 @@ on which to run tests.
$phpbb_functional_url = 'http://localhost/phpBB3/';
-To then run the tests, you run PHPUnit, but use the phpunit.xml.functional
-config file instead of the default one. Specify this through the "-c" option:
+Functional tests are automatically run, if '$phpbb_functional_url' is configured.
+If you only want the functional tests, run:
- $ phpBB/vendor/bin/phpunit -c phpunit.xml.functional
+ $ phpBB/vendor/bin/phpunit --group functional
This will change your board's config.php file, but it makes a backup at
config_dev.php, so you can restore it after the test run is complete.
diff --git a/tests/acp_board/select_auth_method_test.php b/tests/acp_board/select_auth_method_test.php
index b943554564..1eb442bb3d 100644
--- a/tests/acp_board/select_auth_method_test.php
+++ b/tests/acp_board/select_auth_method_test.php
@@ -18,8 +18,8 @@ class phpbb_acp_board_select_auth_method_test extends phpbb_test_case
public static function select_auth_method_data()
{
return array(
- array('acp_board_valid', '<option value="acp_board_valid" selected="selected">Acp_board_valid</option>'),
- array('acp_board_invalid', '<option value="acp_board_valid">Acp_board_valid</option>'),
+ array('acp_board_valid', '<option value="acp_board_valid" selected="selected" data-toggle-setting="#auth_acp_board_valid_settings">Acp_board_valid</option>'),
+ array('acp_board_invalid', '<option value="acp_board_valid" data-toggle-setting="#auth_acp_board_valid_settings">Acp_board_valid</option>'),
);
}
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 7b8b78dd22..e0564f0a11 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -68,7 +68,7 @@ class phpbb_controller_controller_test extends phpbb_test_case
include(__DIR__.'/phpbb/controller/foo.php');
}
- $resolver = new \phpbb\controller\resolver(new \phpbb\user, $container);
+ $resolver = new \phpbb\controller\resolver(new \phpbb\user, $container, dirname(__FILE__) . '/');
$symfony_request = new Request();
$symfony_request->attributes->set('_controller', 'foo.controller:handle');
diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php
index 5f02158e20..8a724f2133 100644
--- a/tests/functional/extension_acp_test.php
+++ b/tests/functional/extension_acp_test.php
@@ -157,7 +157,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
$this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('div.main thead')->text());
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
- $this->assertContains($this->lang('EXTENSION_ENABLE_CONFIRM', 'phpBB Moo Extension'), $crawler->filter('.errorbox')->text());
+ $this->assertContains($this->lang('EXTENSION_ENABLE_CONFIRM', 'phpBB Moo Extension'), $crawler->filter('#main')->text());
}
public function test_disable_pre()
@@ -169,7 +169,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
$this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('div.main thead')->text());
$crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=vendor2%2Ffoo&sid=' . $this->sid);
- $this->assertContains($this->lang('EXTENSION_DISABLE_CONFIRM', 'phpBB Foo Extension'), $crawler->filter('.errorbox')->text());
+ $this->assertContains($this->lang('EXTENSION_DISABLE_CONFIRM', 'phpBB Foo Extension'), $crawler->filter('#main')->text());
}
public function test_delete_data_pre()
diff --git a/tests/functional/visibility_reapprove_test.php b/tests/functional/visibility_reapprove_test.php
index 70134ef724..57a1212c57 100644
--- a/tests/functional/visibility_reapprove_test.php
+++ b/tests/functional/visibility_reapprove_test.php
@@ -208,8 +208,7 @@ class phpbb_functional_visibility_reapprove_test extends phpbb_functional_test_c
$crawler = self::submit($form);
$form = $crawler->selectButton($this->lang('YES'))->form();
$crawler = self::submit($form);
- //@todo $this->assertContainsLang('TOPIC_APPROVED_SUCCESS', $crawler->text());
- $this->assertContainsLang('POST_APPROVED_SUCCESS', $crawler->text());
+ $this->assertContainsLang('TOPIC_APPROVED_SUCCESS', $crawler->text());
$this->assert_forum_details($this->data['forums']['Reapprove Test #1'], array(
'forum_posts_approved' => 3,