function BeanUnitTests::testBeanTypeURL in Bean (for Drupal 7) 7
Test the URL of the bean types.
File
- tests/
BeanUnitTests.test, line 27 - Some unit-like tests.
Class
- BeanUnitTests
- Test specific parts of the bean type class.
Code
function testBeanTypeURL() {
$test_plugin = array(
'label' => t('Test'),
'name' => 'test_name',
'description' => t('This is a test plugin'),
'handler' => array(
'class' => 'BeanTestPlugin',
'parent' => 'bean',
),
);
$bean_type = new BeanDefault($test_plugin);
$bean_type->type = "test_name";
$this
->assertEqual($bean_type
->buildURL(), 'test-name', t('URL is formatted correctly.'));
}