function SimpleTestFunctionalTest::assertAssertion
Assert that an assertion with the specified values is displayed in the test results.
Parameters
string $message Assertion message.:
string $type Assertion type.:
string $status Assertion status.:
string $file File where the assertion originated.:
string $functuion Function where the assertion originated.:
Return value
Assertion result.
2 calls to SimpleTestFunctionalTest::assertAssertion()
- SimpleTestFunctionalTest::confirmStubTestResults in drupal-7.x/
modules/ simpletest/ simpletest.test - Confirm that the stub test produced the desired results.
- SimpleTestFunctionalTest::confirmStubTestResults in drupal-7.x/
modules/ simpletest/ simpletest.test - Confirm that the stub test produced the desired results.
Archivo
- drupal-7.x/
modules/ simpletest/ simpletest.test, line 239 - Tests for simpletest.module.
Class
Código
function assertAssertion($message, $type, $status, $file, $function) {
$message = trim(strip_tags($message));
$found = FALSE;
foreach ($this->childTestResults['assertions'] as $assertion) {
if ((strpos($assertion['message'], $message) !== FALSE) && $assertion['type'] == $type && $assertion['status'] == $status && $assertion['file'] == $file && $assertion['function'] == $function) {
$found = TRUE;
break;
}
}
return $this->assertTrue($found, format_string('Found assertion {"@message", "@type", "@status", "@file", "@function"}.', array('@message' => $message, '@type' => $type, '@status' => $status, "@file" => $file, "@function" => $function)));
}