function SimpleTestBrokenSetUp::testBreakSetUp in Drupal 7
Runs this test case from within the simpletest child site.
File
- modules/simpletest/ simpletest.test, line 604 
- 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 (!drupal_valid_test_ua()) {
    $edit['SimpleTestBrokenSetUp'] = TRUE;
    $this
      ->drupalPost('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.'));
  }
  else {
    $this
      ->pass(t('The test method has run.'));
  }
}