aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-08-05 19:00:20 -0500
committerUnknown Bliss <m@michaelcullum.com>2012-09-01 15:05:56 +0100
commit7b643fe8a5fd3b92bb4db9eacb27645417004709 (patch)
tree89e96aa6658d75f1ef443bb00f5990077212ff99 /tests
parentdce04b2d03f93c9237b743afbcbd89fb6405f836 (diff)
downloadforums-7b643fe8a5fd3b92bb4db9eacb27645417004709.tar
forums-7b643fe8a5fd3b92bb4db9eacb27645417004709.tar.gz
forums-7b643fe8a5fd3b92bb4db9eacb27645417004709.tar.bz2
forums-7b643fe8a5fd3b92bb4db9eacb27645417004709.tar.xz
forums-7b643fe8a5fd3b92bb4db9eacb27645417004709.zip
[ticket/10631] Make failure to meet ext enable requirements clearer
Turn the blocks red on the details page if requirement is not met. Also changing a how the errors come up when trying to enable/disable an extension when they cannot be. PHPBB3-10631
Diffstat (limited to 'tests')
-rw-r--r--tests/extension/acp.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/extension/acp.php b/tests/extension/acp.php
index c078a3f7b4..78a770343b 100644
--- a/tests/extension/acp.php
+++ b/tests/extension/acp.php
@@ -178,9 +178,11 @@ class acp_test extends phpbb_functional_test_case
public function test_enable_pre()
{
- // Foo is already enabled (error)
+ // Foo is already enabled (redirect to list)
$crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=foo&sid=' . $this->sid);
- $this->assertContainsLang('EXTENSION_NOT_AVAILABLE', $crawler->filter('html')->text());
+ $this->assertContainsLang('EXTENSION_NAME', $crawler->filter('html')->text());
+ $this->assertContainsLang('EXTENSION_OPTIONS', $crawler->filter('html')->text());
+ $this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('html')->text());
$crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
$this->assertContainsLang('ENABLE_CONFIRM', $crawler->filter('html')->text());
@@ -188,9 +190,11 @@ class acp_test extends phpbb_functional_test_case
public function test_disable_pre()
{
- // Moo is not enabled (error)
+ // Moo is not enabled (redirect to list)
$crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
- $this->assertContainsLang('EXTENSION_NOT_AVAILABLE', $crawler->filter('html')->text());
+ $this->assertContainsLang('EXTENSION_NAME', $crawler->filter('html')->text());
+ $this->assertContainsLang('EXTENSION_OPTIONS', $crawler->filter('html')->text());
+ $this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('html')->text());
$crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=foo&sid=' . $this->sid);
$this->assertContainsLang('DISABLE_CONFIRM', $crawler->filter('html')->text());
@@ -206,20 +210,14 @@ class acp_test extends phpbb_functional_test_case
$this->assertContainsLang('PURGE_CONFIRM', $crawler->filter('html')->text());
}
- public function test_enable()
+ public function test_actions()
{
$crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable&ext_name=vendor%2Fmoo&sid=' . $this->sid);
$this->assertContainsLang('ENABLE_SUCCESS', $crawler->filter('html')->text());
- }
- public function test_disable()
- {
$crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable&ext_name=vendor%2Fmoo&sid=' . $this->sid);
$this->assertContainsLang('DISABLE_SUCCESS', $crawler->filter('html')->text());
- }
- public function test_purge()
- {
$crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=purge&ext_name=vendor%2Fmoo&sid=' . $this->sid);
$this->assertContainsLang('PURGE_SUCCESS', $crawler->filter('html')->text());
}