You are here

function SimpleTestFunctionalTest::stubTest in Drupal 7

Test to be run and the results confirmed.

1 call to SimpleTestFunctionalTest::stubTest()
SimpleTestFunctionalTest::testWebTestRunner in modules/simpletest/simpletest.test
Make sure that tests selected through the web interface are run and that the results are displayed correctly.

File

modules/simpletest/simpletest.test, line 157
Tests for simpletest.module.

Class

SimpleTestFunctionalTest
@file Tests for simpletest.module.

Code

function stubTest() {
  $this
    ->pass($this->pass);
  $this
    ->fail($this->fail);
  $this
    ->drupalCreateUser(array(
    $this->valid_permission,
  ));
  $this
    ->drupalCreateUser(array(
    $this->invalid_permission,
  ));
  $this
    ->pass(t('Test ID is @id.', array(
    '@id' => $this->testId,
  )));

  // Generates a warning.
  $a = '';
  foreach ($a as $b) {
  }

  // Call an assert function specific to that class.
  $this
    ->assertNothing();

  // Generates 3 warnings inside a PHP function.
  simplexml_load_string('<fake>');
  debug('Foo', 'Debug');
}