You are here

public function CowInstanceTest::testCreateLocation in Location 7.3

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

File

tests/cow.test, line 44

Class

CowInstanceTest
Class CowInstanceTest.

Code

public 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'));
}