You are here

function ImageGalleryTest::createGallery in Image 7

Same name and namespace in other branches
  1. 6 contrib/image_gallery/tests/image_gallery.test \ImageGalleryTest::createGallery()
1 call to ImageGalleryTest::createGallery()
ImageGalleryTest::testBasic in contrib/image_gallery/tests/image_gallery.test

File

contrib/image_gallery/tests/image_gallery.test, line 71

Class

ImageGalleryTest

Code

function createGallery($edit = array()) {
  $defaults = array(
    'name' => $this
      ->randomName(),
    'parent[0]' => 0,
  );
  $edit = $edit + $defaults;
  $this
    ->drupalPost('admin/content/image/add', $edit, 'Submit');
  $this
    ->assertWantedRaw(t('Created new gallery %term.', array(
    '%term' => $edit['name'],
  )), 'Image gallery created. %s');
  $terms = taxonomy_get_term_by_name($edit['name']);
  return $terms[0]->tid;
}