You are here

function SimpleTestFunctionalTest::inCURL in SimpleTest 7

Same name and namespace in other branches
  1. 6.2 simpletest.test \SimpleTestFunctionalTest::inCURL()
  2. 7.2 simpletest.test \SimpleTestFunctionalTest::inCURL()

Check if the test is being run from inside a CURL request.

Return value

The test is being run from inside a CURL request.

3 calls to SimpleTestFunctionalTest::inCURL()
SimpleTestFunctionalTest::setUp in ./simpletest.test
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
SimpleTestFunctionalTest::testInternalBrowser in ./simpletest.test
Test the internal browsers functionality.
SimpleTestFunctionalTest::testWebTestRunner in ./simpletest.test
Make sure that tests selected through the web interface are run and that the results are displayed correctly.

File

./simpletest.test, line 267

Class

SimpleTestFunctionalTest

Code

function inCURL() {
  return isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^simpletest\\d+/", $_SERVER['HTTP_USER_AGENT']);
}