function ShoutboxBaseTestCase::getShoutId in Shoutbox 7
Same name and namespace in other branches
- 7.2 shoutbox.test \ShoutboxBaseTestCase::getShoutId()
Given a shout, queries the database for the id of the shout.
4 calls to ShoutboxBaseTestCase::getShoutId()
- ShoutboxDeleteTestCase::testShoutboxDeleteForm in ./
shoutbox.test - Test that we can delete a shout.
- ShoutboxEditTestCase::testShoutboxCannotEditForm in ./
shoutbox.test - Test that user without edit permissions cannot edit.
- ShoutboxEditTestCase::testShoutboxEditForm in ./
shoutbox.test - Test that we can get an edit form.
- ShoutboxModerateTestCase::testShoutboxModeratedUser in ./
shoutbox.test - Test users who need approval before shouts are accepted.
File
- ./
shoutbox.test, line 50 - Shoutbox testing.
Class
- ShoutboxBaseTestCase
- @file Shoutbox testing.
Code
function getShoutId($message, $uid) {
$id = db_query('SELECT shout_id FROM {shoutbox} WHERE shout = :shout AND uid = :uid', array(
':shout' => $message,
':uid' => $uid,
))
->fetchField();
// debug($id);
return $id;
}