You are here

function CowInstanceTest::testCreateLocation in Location 6.3

Same name and namespace in other branches
  1. 7.5 tests/cow.test \CowInstanceTest::testCreateLocation()
  2. 7.3 tests/cow.test \CowInstanceTest::testCreateLocation()
  3. 7.4 tests/cow.test \CowInstanceTest::testCreateLocation()

File

tests/cow.test, line 41

Class

CowInstanceTest

Code

function testCreateLocation() {
  $settings = array();
  $location_type = $this
    ->addLocationContentType($settings);
  $location1_name = $this
    ->randomName();
  $node = $this
    ->drupalCreateNode(array(
    'type' => $location_type,
    'locations' => array(
      0 => array(
        'name' => $location1_name,
        'location_settings' => $settings,
      ),
    ),
  ));

  // Reload the node.
  $node2 = node_load($node->nid, NULL, TRUE);
  $this
    ->assertEqual($location1_name, $node2->locations[0]['name'], t('Testing basic save/load'));
}