You are here

function ImageGalleryTest::createGallery in Image 6

Same name and namespace in other branches
  1. 7 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 75

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;
}