aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/metadata_manager_test.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-05-03 15:52:16 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-05-08 08:47:28 +0200
commit54680b9709ab2288408cbb0ddc7737e93d41de18 (patch)
tree81c74705f711d37dd399a636f01c7444b9320eae /tests/functional/metadata_manager_test.php
parent4c9c1d8c02142315d88bb7aaee2f64015c5033b7 (diff)
downloadforums-54680b9709ab2288408cbb0ddc7737e93d41de18.tar
forums-54680b9709ab2288408cbb0ddc7737e93d41de18.tar.gz
forums-54680b9709ab2288408cbb0ddc7737e93d41de18.tar.bz2
forums-54680b9709ab2288408cbb0ddc7737e93d41de18.tar.xz
forums-54680b9709ab2288408cbb0ddc7737e93d41de18.zip
[ticket/11450] Limit scopes of filters and add better docs
PHPBB3-11450
Diffstat (limited to 'tests/functional/metadata_manager_test.php')
-rw-r--r--tests/functional/metadata_manager_test.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php
index c639cad809..0125886e04 100644
--- a/tests/functional/metadata_manager_test.php
+++ b/tests/functional/metadata_manager_test.php
@@ -78,9 +78,9 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
$crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&sid=' . $this->sid);
$this->assert_response_success();
- $this->assertContains($this->lang('EXTENSIONS_EXPLAIN'), $crawler->filter('#page-body')->text());
- $this->assertContains('phpBB 3.1 Extension Testing', $crawler->filter('#page-body')->text());
- $this->assertContains('Details', $crawler->filter('#page-body')->text());
+ $this->assertContains($this->lang('EXTENSIONS_EXPLAIN'), $crawler->filter('#main')->text());
+ $this->assertContains('phpBB 3.1 Extension Testing', $crawler->filter('#main')->text());
+ $this->assertContains('Details', $crawler->filter('#main')->text());
}
public function test_extensions_details()
@@ -89,15 +89,15 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
$this->assert_response_success();
// Test whether the details are displayed
- $this->assertContains($this->lang('CLEAN_NAME'), $crawler->filter('#page-body')->text());
- $this->assertContains('foo/bar', $crawler->filter('#page-body')->text());
+ $this->assertContains($this->lang('CLEAN_NAME'), $crawler->filter('#main')->text());
+ $this->assertContains('foo/bar', $crawler->filter('#meta_name')->text());
+ $this->assertContains($this->lang('PHP_VERSION'), $crawler->filter('#main')->text());
+ $this->assertContains('>=5.3', $crawler->filter('#require_php')->text());
// Details should be html escaped
- $this->assertContains($this->lang('PHP_VERSION'), $crawler->filter('#page-body')->text());
- // The Crawler parses the text, so we can not see whether it was escaped anymore
- // To test this, we grab the content of the response directly
- // $this->assertContains('&gt;=5.3', $$crawler->filter('#page-body')->text());
- $this->assertContains('&gt;=5.3', $this->client->getResponse()->getContent());
+ // However, text() only returns the displayed text, so HTML Special Chars are decoded.
+ // So we test this directly on the content of the response.
+ $this->assertContains('<p id="require_php">&gt;=5.3</p>', $this->client->getResponse()->getContent());
}
public function test_extensions_details_notexists()
@@ -106,6 +106,6 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
$this->assert_response_success();
// Error message because the files do not exist
- $this->assertContains('The required file does not exist:', $crawler->filter('#page-body')->text());
+ $this->assertContains('The required file does not exist:', $crawler->filter('#main')->text());
}
}