function DatabaseTransactionTestCase::assertRowAbsent
Assert that a given row is absent from the test table.
Parameters
$name: The name of the row.
$message: The message to log for the assertion.
4 calls to DatabaseTransactionTestCase::assertRowAbsent()
- DatabaseTransactionTestCase::testTransactionStacking in drupal-7.x/
modules/ simpletest/ tests/ database_test.test - Test transaction stacking and commit / rollback.
- DatabaseTransactionTestCase::testTransactionStacking in drupal-7.x/
modules/ simpletest/ tests/ database_test.test - Test transaction stacking and commit / rollback.
- DatabaseTransactionTestCase::testTransactionWithDdlStatement in drupal-7.x/
modules/ simpletest/ tests/ database_test.test - Test the compatibility of transactions with DDL statements.
- DatabaseTransactionTestCase::testTransactionWithDdlStatement in drupal-7.x/
modules/ simpletest/ tests/ database_test.test - Test the compatibility of transactions with DDL statements.
Archivo
- drupal-7.x/
modules/ simpletest/ tests/ database_test.test, line 3676
Class
- DatabaseTransactionTestCase
- Test transaction support, particularly nesting.
Código
function assertRowAbsent($name, $message = NULL) {
if (!isset($message)) {
$message = format_string('Row %name is absent.', array('%name' => $name));
}
$present = (boolean) db_query('SELECT 1 FROM {test} WHERE name = :name', array(':name' => $name))->fetchField();
return $this->assertFalse($present, $message);
}