mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-19 06:51:33 +02:00
[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
This commit is contained in:
committed by
Unknown Bliss
parent
dce04b2d03
commit
7b643fe8a5
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user