function OgVocabTestCase::OgVocabTestPage in OG Vocabulary 6
Helper function to assert the access to a menu item.
Parameters
$message: The prefix of the message.
$responses: Array keyed by the page name (as defined in $this->og_vocab_pages), and TRUE or FALSE if the access should be allowed.
1 call to OgVocabTestCase::OgVocabTestPage()
- OgVocabTestCase::testOgVocabAccess in ./
og_vocab.test - Test access to vocabulary.
File
- ./
og_vocab.test, line 159
Class
Code
function OgVocabTestPage($message, $responses = array()) {
foreach ($this->og_vocab_pages as $name => $url) {
$response = !empty($responses[$name]) ? 200 : 403;
$op = $response == 200 ? t('can') : t('can not');
$this
->drupalGet($url);
$this
->assertResponse($response, $message . ' ' . $op . ' ' . $name . '.');
}
}