function BeanTestPlugins::testBeanTypeLinks in Bean (for Drupal 7) 7
Verity that the correct links appear.
File
- tests/
BeanTestPlugins.test, line 48 - A class for testing the plugin API.
Class
- BeanTestPlugins
- Test the plugin API.
Code
function testBeanTypeLinks() {
$this
->drupalGet('block/add');
// Verify the block add pages exists.
$this
->assertResponse(200, t('Block Add Page is accessible'));
// There should 2 plugins links.
$this
->assertLinkByHref('block/add/test-bean', 0, t('A link to the bean add for each type should exist'));
$this
->assertLinkByHref('block/add/test-bean-2', 0, t('A link to the bean add for each type should exist'));
$this
->assertNoLinkByHref('block/add/test-no-bean', t('A link to an invalid bean type should not exist'));
$this
->assertNoLinkByHref('block/add/test-wrong-class', t('A link to an invalid bean type should not exist'));
}