| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: contributor.test,v 1.1.2.1 2009/11/16 02:24:22 rjerome Exp $ |
| 3 |
/* |
/* |
| 4 |
* @file |
* @file |
| 5 |
* Tests for contributor handling in the Biblio module |
* Tests for contributor handling in the Biblio module |
| 81 |
$node = $this->createNode(); |
$node = $this->createNode(); |
| 82 |
$nid = $node->nid; |
$nid = $node->nid; |
| 83 |
$vid1 = $node->vid; |
$vid1 = $node->vid; |
|
$node->biblio_contributors[1][] = array('name' => 'Ron J. Jeromezzzzzz', 'auth_type' => 1); |
|
|
$node->biblio_contributors[1][] = array('name' => 'John Smithzzzzzz', 'auth_type' => 1); |
|
|
$node->biblio_contributors[1][] = array('name' => 'George W. Bushzzzzzz', 'auth_type' => 1); |
|
|
biblio_insert_contributors($node); |
|
|
$node = node_load($nid, NULL, TRUE); |
|
|
foreach($node->biblio_contributors[1] as $author) { |
|
|
$this->cids[] = $author['cid']; |
|
|
} |
|
| 84 |
$this->assertIdentical($node->biblio_contributors[1][2]['firstname'], 'George', 'Test biblio_insert_contributors($node), firstname'); |
$this->assertIdentical($node->biblio_contributors[1][2]['firstname'], 'George', 'Test biblio_insert_contributors($node), firstname'); |
| 85 |
$this->assertIdentical($node->biblio_contributors[1][2]['lastname'], 'Bushzzzzzz', 'Test biblio_insert_contributors($node), lastname' ); |
$this->assertIdentical($node->biblio_contributors[1][2]['lastname'], 'Bushzzzzzz', 'Test biblio_insert_contributors($node), lastname' ); |
| 86 |
unset ($node->biblio_contributors[1][2]); |
unset ($node->biblio_contributors[1][2]); |