1 simpletest.test SimpleTestFunctionalTest::testWebTestRunner()

Make sure that tests selected through the web interface are run and that the results are displayed correctly.

File

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

Class

SimpleTestFunctionalTest

Code

function testWebTestRunner() {
  $this->pass = t('SimpleTest pass.');
  $this->fail = t('SimpleTest fail.');
  $this->valid_permission = 'access content';
  $this->invalid_permission = 'invalid permission';

  if ($this->inCURL()) {
    // Only run following code if this test is running itself through a CURL request.
    $this->stubTest();
  }
  else {
    // Run this test from web interface.
    $this->backdropGet('admin/config/development/testing');

    $edit = array();
    $edit['tests[SimpleTestFunctionalTest]'] = TRUE;
    $this->backdropPost(NULL, $edit, t('Run tests'));

    // Parse results and confirm that they are correct.
    $this->getTestResults();
    $this->confirmStubTestResults();
  }
}