You are here

function ShoutboxUserAccessTest::_get_shout_id in Shoutbox 6

Same name and namespace in other branches
  1. 5 tests/shoutbox_user_access.test \ShoutboxUserAccessTest::_get_shout_id()

Helper function to get the shout id

4 calls to ShoutboxUserAccessTest::_get_shout_id()
ShoutboxUserAccessTest::testAdminUserAccess in tests/shoutbox_user_access.test
ShoutboxUserAccessTest::testModeratedUserAccess in tests/shoutbox_user_access.test
ShoutboxUserAccessTest::testModerationUserAccess in tests/shoutbox_user_access.test
ShoutboxUserAccessTest::testUnmoderatedUserAccess in tests/shoutbox_user_access.test

File

tests/shoutbox_user_access.test, line 83
shoutbox unit test for shoutbox_user_access and shoutbox_is_user_owned

Class

ShoutboxUserAccessTest
@file shoutbox unit test for shoutbox_user_access and shoutbox_is_user_owned

Code

function _get_shout_id($shout) {
  $shout_id = db_result(db_query("SELECT shout_id FROM {shoutbox} WHERE nick = '%s' AND shout = '%s' ", $shout['nick'], $shout['message']));
  return $shout_id;
}