You are here

function BatchProcessingTestCase::assertBatchMessages in Drupal 7

Will trigger a pass if the texts were found in order in the raw content.

Parameters

$texts: Array of raw strings to look for .

$message: Message to display.

Return value

TRUE on pass, FALSE on fail.

6 calls to BatchProcessingTestCase::assertBatchMessages()
BatchProcessingTestCase::testBatchForm in modules/simpletest/tests/batch.test
Test batches defined in a form submit handler.
BatchProcessingTestCase::testBatchFormMultipleBatches in modules/simpletest/tests/batch.test
Test batches defined in different submit handlers on the same form.
BatchProcessingTestCase::testBatchFormMultistep in modules/simpletest/tests/batch.test
Test batches defined in a multistep form.
BatchProcessingTestCase::testBatchFormProgrammatic in modules/simpletest/tests/batch.test
Test batches defined in a programmatically submitted form.
BatchProcessingTestCase::testBatchLargePercentage in modules/simpletest/tests/batch.test
Test batches that return $context['finished'] > 1 do in fact complete. See http://drupal.org/node/600836

... See full list

File

modules/simpletest/tests/batch.test, line 163
Tests for the Batch API.

Class

BatchProcessingTestCase
Tests for the Batch API.

Code

function assertBatchMessages($texts, $message) {
  $pattern = '|' . implode('.*', $texts) . '|s';
  return $this
    ->assertPattern($pattern, $message);
}