function CasLoginBlockTestCase::assertCasLoginBlock in CAS 6.3
Same name and namespace in other branches
- 7 cas.test \CasLoginBlockTestCase::assertCasLoginBlock()
Asserts that the CAS login block is shown or not shown.
Parameters
$visible: Whether or not the CAS login block is expected to be shown.
Return value
TRUE if the assertion succeeded, FALSE otherwise.
1 call to CasLoginBlockTestCase::assertCasLoginBlock()
- CasLoginBlockTestCase::testCasLoginBlock in ./
cas.test - Tests the visibility and functionality of the CAS login block.
File
- ./
cas.test, line 838 - Tests for cas.module.
Class
- CasLoginBlockTestCase
- Tests the visibility and functionality of the CAS login block.
Code
function assertCasLoginBlock($visible) {
$xpath = '//div[@id=block-cas-0]/*';
$xpath = $this
->buildXPathQuery('//div[@id=:id]/*', array(
':id' => 'block-cas-0',
));
if ($visible) {
return $this
->assertFieldByXPath($xpath, NULL, t('CAS login block found.'));
}
else {
return $this
->assertNoFieldByXPath($xpath, NULL, t('CAS login block not found.'));
}
}