1 simpletest.test SimpleTestBrokenSetUp::testBreakSetUp()

Runs this test case from within the simpletest child site.

File

core/modules/simpletest/tests/simpletest.test, line 583
Tests for simpletest.module.

Class

SimpleTestBrokenSetUp
Tests a test case that does not run parent::setUp() in its setUp() method.

Code

function testBreakSetUp() {
  // If the test is being run from the main site, run it again from the web
  // interface within the simpletest child site.
  if (!backdrop_valid_test_ua()) {
    $edit['tests[SimpleTestBrokenSetUp]'] = TRUE;
    $this->backdropPost('admin/config/development/testing', $edit, t('Run tests'));

    // Verify that the broken test and its tearDown() method are skipped.
    $this->assertRaw(t('The test setUp() method has been run.'));
    $this->assertRaw(t('The test cannot be executed because it has not been set up properly.'));
    $this->assertNoRaw(t('The test method has run.'));
    $this->assertNoRaw(t('The tearDown() method has run.'));
  }
  // If the test is being run from within simpletest, output a message.
  else {
    $this->pass(t('The test method has run.'));
  }
}