You are here

function CustomBreadcrumbsFeaturesCommonTestCase::createBreadcrumb in Custom Breadcrumbs Features 7.2

Helper - Create a breadcrumb using the web UI.

Parameters

$cb_type: Breadcrumb type.

$edit: Array of breadcrumb values.

3 calls to CustomBreadcrumbsFeaturesCommonTestCase::createBreadcrumb()
CustomBreadcrumbsFeaturesIntegrationTestCase::testFeaturesUI in tests/features_integration.test
If I create a breadcrumb, it shows up in the features interface. If I delete a breadcrumb, it does not show up in the features interface.
CustomBreadcrumbsFeaturesMachineNamesTestCase::testDuplicateNames in tests/machine_names.test
Test machine name generation when 2 breadcrumbs have the same name.
CustomBreadcrumbsFeaturesMachineNamesTestCase::testMachineNames in tests/machine_names.test
By default, crumbs have no machine name. If we enable our module, crumbs have machine names. If we create new crumbs, they have machine names. If we uninstall our module, crumbs have no machine name.

File

tests/common.test, line 21
Common helpers for custom_breadcrumbs_features tests.

Class

CustomBreadcrumbsFeaturesCommonTestCase
Common functions for Custom Breadcrumbs Features tests.

Code

function createBreadcrumb($cb_type, $edit = array()) {
  $edit += array(
    'name' => 'Foo Bar',
    'titles' => 'crumb|title',
  );
  $paths = $this
    ->getBreadcrumbTypes();
  $this
    ->drupalGet('admin/structure/custom_breadcrumbs/' . $paths[$cb_type] . '/add');
  $this
    ->assertResponse(200);
  $this
    ->drupalPost(NULL, $edit, t('Save'));
  $this
    ->assertResponse(200);
}