function UserRelationshipsApiSocnetTestCase::testGetRelationNames in User Relationships 6
File
- user_relationships_api/
tests/ user_relationships_api.socnet.test, line 115 - Social networking hook API testcase @author Alex Karshakevich http://drupal.org/user/183217
Class
- UserRelationshipsApiSocnetTestCase
- @file Social networking hook API testcase @author Alex Karshakevich http://drupal.org/user/183217
Code
function testGetRelationNames() {
$result = module_invoke_all('socnet_get_relation_names');
$this
->assertTrue(count($result) == 4);
$this
->assertTrue(in_array('oneway', $result));
$this
->assertTrue(in_array('twoway', $result));
$this
->assertTrue(in_array('approval', $result));
$this
->assertTrue(in_array('approval-oneway', $result));
$result = module_invoke_all('socnet_get_relation_names', 'one-way');
$this
->assertTrue(count($result) == 2);
$this
->assertTrue(in_array('oneway', $result));
$this
->assertTrue(in_array('approval-oneway', $result));
$result = module_invoke_all('socnet_get_relation_names', 'two-way');
$this
->assertTrue(count($result) == 2);
$this
->assertTrue(in_array('twoway', $result));
$this
->assertTrue(in_array('approval', $result));
}