public function LocationCCK2Test::testCCK2 in Location 7.3
File
- tests/
location_cck2.test, line 117
Class
Code
public function testCCK2() {
$settings = array();
$this
->addLocationContentType2($settings, array());
$this
->assertTrue($this
->getTestContentName(), t('Content type' . $this
->getTestContentName() . ' created'));
// test node creation
$node2 = $this
->drupalCreateNode(array(
'type' => $this
->getTestContentName(),
));
$fieldname = 'field_' . $this
->getTestFieldName();
$fielddata = $node2->{$fieldname};
// @todo remove debug
$this
->pass('<pre>' . print_r($node2->{$fieldname}, TRUE) . '</pre>', 'Debug');
$this
->assertEqual('ua', $fielddata['und'][0]['country']);
$this
->assertEqual(50, $fielddata['und'][0]['latitude']);
$this
->assertEqual(30, $fielddata['und'][0]['longitude']);
$this
->assertEqual('Kyiv', $fielddata['und'][0]['name']);
}